Minor fixes
This commit is contained in:
parent
0750c1ece9
commit
8c35aac3c1
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -411,32 +412,33 @@ static GtkWidget * gtk_assistant_new(void)
|
|||||||
GtkWidget * widget;
|
GtkWidget * widget;
|
||||||
GtkWidget * hbox;
|
GtkWidget * hbox;
|
||||||
|
|
||||||
if((assistant = calloc(0, sizeof(*assistant))) == NULL)
|
if((assistant = calloc(1, sizeof(*assistant))) == NULL)
|
||||||
_gtkassistant_error("out of memory", 0);
|
_gtkassistant_error("out of memory", 0);
|
||||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_container_set_border_width(GTK_CONTAINER(window), 4);
|
||||||
gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
|
gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
|
||||||
g_object_set_data(G_OBJECT(window), "assistant", assistant);
|
g_object_set_data(G_OBJECT(window), "assistant", assistant);
|
||||||
g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(
|
g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(
|
||||||
_on_gtkassistant_closex), assistant);
|
_on_gtkassistant_closex), assistant);
|
||||||
vbox = gtk_vbox_new(FALSE, 0);
|
vbox = gtk_vbox_new(FALSE, 4);
|
||||||
/* frame */
|
/* frame */
|
||||||
frame = gtk_frame_new("");
|
frame = gtk_frame_new("");
|
||||||
gtk_widget_show(frame);
|
gtk_widget_show(frame);
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
|
||||||
/* navigation buttons */
|
/* navigation buttons */
|
||||||
hbox = gtk_hbox_new(FALSE, 0);
|
hbox = gtk_hbox_new(FALSE, 4);
|
||||||
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
widget = gtk_button_new_from_stock(GTK_STOCK_GO_FORWARD);
|
||||||
g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(
|
g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(
|
||||||
_on_gtkassistant_cancel), assistant);
|
_on_gtkassistant_forward), assistant);
|
||||||
gtk_widget_show(widget);
|
gtk_widget_show(widget);
|
||||||
gtk_box_pack_end(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
gtk_box_pack_end(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
||||||
widget = gtk_button_new_from_stock(GTK_STOCK_GO_BACK);
|
widget = gtk_button_new_from_stock(GTK_STOCK_GO_BACK);
|
||||||
g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(
|
g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(
|
||||||
_on_gtkassistant_back), assistant);
|
_on_gtkassistant_back), assistant);
|
||||||
gtk_box_pack_end(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
gtk_box_pack_end(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
||||||
widget = gtk_button_new_from_stock(GTK_STOCK_GO_FORWARD);
|
widget = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
||||||
g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(
|
g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(
|
||||||
_on_gtkassistant_forward), assistant);
|
_on_gtkassistant_cancel), assistant);
|
||||||
gtk_widget_show(widget);
|
gtk_widget_show(widget);
|
||||||
gtk_box_pack_end(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
gtk_box_pack_end(GTK_BOX(hbox), widget, FALSE, TRUE, 0);
|
||||||
gtk_widget_show(hbox);
|
gtk_widget_show(hbox);
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "callbacks.h"
|
#include "callbacks.h"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#ifndef MAILER_COMPOSE_H
|
#ifndef MAILER_COMPOSE_H
|
||||||
# define MAILER_COMPOSE_H
|
# define MAILER_COMPOSE_H
|
||||||
|
|
||||||
|
# include <sys/types.h>
|
||||||
# include "mailer.h"
|
# include "mailer.h"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user