Commit 2f34216a authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

app/brush_select.c app/channels_dialog.c app/color_select.c app/devices.c

1999-03-27  Michael Natterer  <mitschel@cs.tu-berlin.de>

        * app/brush_select.c
        * app/channels_dialog.c
        * app/color_select.c
        * app/devices.c
        * app/file_new_dialog.c
        * app/gradient_select.c
        * app/palette_select.c
        * app/pattern_select.c: applied a patch from Marco Lamberto
        <lm@geocities.com> which unifies actionareas ("Cancel" rightmost
        and default). Did the same in some more dialogs.

        * libgimp/gimpfileselection.c
        * libgimp/gimppatheditor.c
        * app/preferences_dialog.[ch]: completely reworked the preferences
        dialog:

        - select the notebook's pages with a tree.
        - reordered the categories. Please give me feedback, this really
          needs to be intuitive.
        - removed lots of unused #include's.
        - turned the prefs. dialog into a test site for new convenience
          constructors. These changes are however not visible. Flame me
          until they're perfect ;) When finished, this stuff can save
          *many* lines of gtk+ code.

        * modules/colorsel_gtk.c: made it circular.
parent 15333df6
1999-03-27 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/brush_select.c
* app/channels_dialog.c
* app/color_select.c
* app/devices.c
* app/file_new_dialog.c
* app/gradient_select.c
* app/palette_select.c
* app/pattern_select.c: applied a patch from Marco Lamberto
<lm@geocities.com> which unifies actionareas ("Cancel" rightmost
and default). Did the same in some more dialogs.
* libgimp/gimpfileselection.c
* libgimp/gimppatheditor.c
* app/preferences_dialog.[ch]: completely reworked the preferences
dialog:
- select the notebook's pages with a tree.
- reordered the categories. Please give me feedback, this really
needs to be intuitive.
- removed lots of unused #include's.
- turned the prefs. dialog into a test site for new convenience
constructors. These changes are however not visible. Flame me
until they're perfect ;) When finished, this stuff can save
*many* lines of gtk+ code.
* modules/colorsel_gtk.c: made it circular.
1999-03-25 Michael Natterer <mitschel@cs.tu-berlin.de>
* unitrc: corrected a typo
......
......@@ -114,8 +114,8 @@ static MenuItem option_items[] =
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("Close"), brush_select_close_callback, NULL, NULL },
{ N_("Refresh"), brush_select_refresh_callback, NULL, NULL }
{ N_("Refresh"), brush_select_refresh_callback, NULL, NULL },
{ N_("Close"), brush_select_close_callback, NULL, NULL }
};
static BrushEditGeneratedWindow *brush_edit_generated_dialog;
......@@ -344,7 +344,7 @@ brush_select_new (gchar * title,
/* The action area */
action_items[0].user_data = bsp;
action_items[1].user_data = bsp;
build_action_area (GTK_DIALOG (bsp->shell), action_items, 2, 0);
build_action_area (GTK_DIALOG (bsp->shell), action_items, 2, 1);
gtk_widget_show (bsp->options_box);
gtk_widget_show (hbox);
......
......@@ -1908,7 +1908,7 @@ channels_dialog_new_channel_query (GimpImage* gimage)
action_items[0].user_data = options;
action_items[1].user_data = options;
build_action_area (GTK_DIALOG (options->query_box), action_items, 2, 0);
build_action_area (GTK_DIALOG (options->query_box), action_items, 2, 1);
gtk_widget_show (table);
gtk_widget_show (vbox);
......
......@@ -152,7 +152,7 @@ static ColorSelectFillUpdateProc update_procs[] =
static ActionAreaItem action_items[2] =
{
{ N_("OK"), color_select_ok_callback, NULL, NULL },
{ N_("Cancel"), color_select_cancel_callback, NULL, NULL },
{ N_("Cancel"), color_select_cancel_callback, NULL, NULL }
};
ColorSelectP
......
......@@ -119,8 +119,8 @@ int current_device = GDK_CORE_POINTER;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("Close"), devices_close_callback, NULL, NULL },
{ N_("Save"), (ActionCallback)devices_write_rc, NULL, NULL },
{ N_("Close"), devices_close_callback, NULL, NULL }
};
void
......@@ -765,8 +765,8 @@ create_device_status (void)
i++;
}
action_items[0].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 0);
action_items[1].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 1);
deviceD->current = 0xffffffff; /* random, but doesn't matter */
device_status_update_current ();
......
......@@ -61,6 +61,13 @@ static gboolean last_new_image = TRUE;
static int new_dialog_run;
extern TileManager *global_buf;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("OK"), file_new_ok_callback, NULL, NULL },
{ N_("Cancel"), file_new_cancel_callback, NULL, NULL }
};
static void
file_new_ok_callback (GtkWidget *widget,
gpointer data)
......@@ -334,33 +341,17 @@ file_new_cmd_callback (GtkWidget *widget,
gtk_window_set_wmclass (GTK_WINDOW (vals->dlg), "new_image", "Gimp");
gtk_window_set_title (GTK_WINDOW (vals->dlg), _("New Image"));
gtk_window_set_position (GTK_WINDOW (vals->dlg), GTK_WIN_POS_MOUSE);
gtk_window_set_policy(GTK_WINDOW (vals->dlg), FALSE, FALSE, FALSE);
gtk_window_set_policy(GTK_WINDOW (vals->dlg), FALSE, FALSE, FALSE);
/* handle the wm close signal */
gtk_signal_connect (GTK_OBJECT (vals->dlg), "delete_event",
GTK_SIGNAL_FUNC (file_new_delete_callback),
vals);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (vals->dlg)->action_area), 2);
button = gtk_button_new_with_label (_("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) file_new_ok_callback,
vals);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label (_("Cancel"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) file_new_cancel_callback,
vals);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
/* The action area */
action_items[0].user_data = vals;
action_items[1].user_data = vals;
build_action_area (GTK_DIALOG (vals->dlg), action_items, 2, 1);
/* vbox holding the rest of the dialog */
vbox = gtk_vbox_new (FALSE, 1);
......
This diff is collapsed.
......@@ -61,6 +61,13 @@ static gboolean last_new_image = TRUE;
static int new_dialog_run;
extern TileManager *global_buf;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("OK"), file_new_ok_callback, NULL, NULL },
{ N_("Cancel"), file_new_cancel_callback, NULL, NULL }
};
static void
file_new_ok_callback (GtkWidget *widget,
gpointer data)
......@@ -334,33 +341,17 @@ file_new_cmd_callback (GtkWidget *widget,
gtk_window_set_wmclass (GTK_WINDOW (vals->dlg), "new_image", "Gimp");
gtk_window_set_title (GTK_WINDOW (vals->dlg), _("New Image"));
gtk_window_set_position (GTK_WINDOW (vals->dlg), GTK_WIN_POS_MOUSE);
gtk_window_set_policy(GTK_WINDOW (vals->dlg), FALSE, FALSE, FALSE);
gtk_window_set_policy(GTK_WINDOW (vals->dlg), FALSE, FALSE, FALSE);
/* handle the wm close signal */
gtk_signal_connect (GTK_OBJECT (vals->dlg), "delete_event",
GTK_SIGNAL_FUNC (file_new_delete_callback),
vals);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (vals->dlg)->action_area), 2);
button = gtk_button_new_with_label (_("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) file_new_ok_callback,
vals);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label (_("Cancel"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) file_new_cancel_callback,
vals);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
/* The action area */
action_items[0].user_data = vals;
action_items[1].user_data = vals;
build_action_area (GTK_DIALOG (vals->dlg), action_items, 2, 1);
/* vbox holding the rest of the dialog */
vbox = gtk_vbox_new (FALSE, 1);
......
......@@ -90,8 +90,8 @@ extern void import_palette_grad_update(gradient_t *); /* ALT Hmm... */
static ActionAreaItem action_items[2] =
{
{ N_("Close"), grad_select_close_callback, NULL, NULL },
{ N_("Edit"), grad_select_edit_callback, NULL, NULL },
{ N_("Close"), grad_select_close_callback, NULL, NULL }
};
void
......@@ -520,7 +520,7 @@ gsel_new_selection(gchar * title,
action_items[0].user_data = gsp;
action_items[1].user_data = gsp;
build_action_area (GTK_DIALOG (gsp->shell), action_items, 2, 0);
build_action_area (GTK_DIALOG (gsp->shell), action_items, 2, 1);
if(!title)
{
......
......@@ -114,8 +114,8 @@ static MenuItem option_items[] =
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("Close"), brush_select_close_callback, NULL, NULL },
{ N_("Refresh"), brush_select_refresh_callback, NULL, NULL }
{ N_("Refresh"), brush_select_refresh_callback, NULL, NULL },
{ N_("Close"), brush_select_close_callback, NULL, NULL }
};
static BrushEditGeneratedWindow *brush_edit_generated_dialog;
......@@ -344,7 +344,7 @@ brush_select_new (gchar * title,
/* The action area */
action_items[0].user_data = bsp;
action_items[1].user_data = bsp;
build_action_area (GTK_DIALOG (bsp->shell), action_items, 2, 0);
build_action_area (GTK_DIALOG (bsp->shell), action_items, 2, 1);
gtk_widget_show (bsp->options_box);
gtk_widget_show (hbox);
......
......@@ -1908,7 +1908,7 @@ channels_dialog_new_channel_query (GimpImage* gimage)
action_items[0].user_data = options;
action_items[1].user_data = options;
build_action_area (GTK_DIALOG (options->query_box), action_items, 2, 0);
build_action_area (GTK_DIALOG (options->query_box), action_items, 2, 1);
gtk_widget_show (table);
gtk_widget_show (vbox);
......
......@@ -152,7 +152,7 @@ static ColorSelectFillUpdateProc update_procs[] =
static ActionAreaItem action_items[2] =
{
{ N_("OK"), color_select_ok_callback, NULL, NULL },
{ N_("Cancel"), color_select_cancel_callback, NULL, NULL },
{ N_("Cancel"), color_select_cancel_callback, NULL, NULL }
};
ColorSelectP
......
......@@ -119,8 +119,8 @@ int current_device = GDK_CORE_POINTER;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("Close"), devices_close_callback, NULL, NULL },
{ N_("Save"), (ActionCallback)devices_write_rc, NULL, NULL },
{ N_("Close"), devices_close_callback, NULL, NULL }
};
void
......@@ -765,8 +765,8 @@ create_device_status (void)
i++;
}
action_items[0].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 0);
action_items[1].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 1);
deviceD->current = 0xffffffff; /* random, but doesn't matter */
device_status_update_current ();
......
......@@ -61,6 +61,13 @@ static gboolean last_new_image = TRUE;
static int new_dialog_run;
extern TileManager *global_buf;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("OK"), file_new_ok_callback, NULL, NULL },
{ N_("Cancel"), file_new_cancel_callback, NULL, NULL }
};
static void
file_new_ok_callback (GtkWidget *widget,
gpointer data)
......@@ -334,33 +341,17 @@ file_new_cmd_callback (GtkWidget *widget,
gtk_window_set_wmclass (GTK_WINDOW (vals->dlg), "new_image", "Gimp");
gtk_window_set_title (GTK_WINDOW (vals->dlg), _("New Image"));
gtk_window_set_position (GTK_WINDOW (vals->dlg), GTK_WIN_POS_MOUSE);
gtk_window_set_policy(GTK_WINDOW (vals->dlg), FALSE, FALSE, FALSE);
gtk_window_set_policy(GTK_WINDOW (vals->dlg), FALSE, FALSE, FALSE);
/* handle the wm close signal */
gtk_signal_connect (GTK_OBJECT (vals->dlg), "delete_event",
GTK_SIGNAL_FUNC (file_new_delete_callback),
vals);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (vals->dlg)->action_area), 2);
button = gtk_button_new_with_label (_("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) file_new_ok_callback,
vals);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label (_("Cancel"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) file_new_cancel_callback,
vals);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
/* The action area */
action_items[0].user_data = vals;
action_items[1].user_data = vals;
build_action_area (GTK_DIALOG (vals->dlg), action_items, 2, 1);
/* vbox holding the rest of the dialog */
vbox = gtk_vbox_new (FALSE, 1);
......
......@@ -90,8 +90,8 @@ extern void import_palette_grad_update(gradient_t *); /* ALT Hmm... */
static ActionAreaItem action_items[2] =
{
{ N_("Close"), grad_select_close_callback, NULL, NULL },
{ N_("Edit"), grad_select_edit_callback, NULL, NULL },
{ N_("Close"), grad_select_close_callback, NULL, NULL }
};
void
......@@ -520,7 +520,7 @@ gsel_new_selection(gchar * title,
action_items[0].user_data = gsp;
action_items[1].user_data = gsp;
build_action_area (GTK_DIALOG (gsp->shell), action_items, 2, 0);
build_action_area (GTK_DIALOG (gsp->shell), action_items, 2, 1);
if(!title)
{
......
......@@ -119,8 +119,8 @@ int current_device = GDK_CORE_POINTER;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("Close"), devices_close_callback, NULL, NULL },
{ N_("Save"), (ActionCallback)devices_write_rc, NULL, NULL },
{ N_("Close"), devices_close_callback, NULL, NULL }
};
void
......@@ -765,8 +765,8 @@ create_device_status (void)
i++;
}
action_items[0].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 0);
action_items[1].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 1);
deviceD->current = 0xffffffff; /* random, but doesn't matter */
device_status_update_current ();
......
......@@ -55,8 +55,8 @@ static void palette_select_edit_callback (GtkWidget *w,gpointer client_data)
static ActionAreaItem action_items[2] =
{
{ N_("Close"), palette_select_close_callback, NULL, NULL },
{ N_("Edit"), palette_select_edit_callback, NULL, NULL },
{ N_("Close"), palette_select_close_callback, NULL, NULL }
};
void
......
......@@ -73,8 +73,8 @@ static void pattern_select_scroll_update (GtkAdjustment *, gpointer);
/* the action area structure */
static ActionAreaItem action_items[2] =
{
{ N_("Close"), pattern_select_close_callback, NULL, NULL },
{ N_("Refresh"), pattern_select_refresh_callback, NULL, NULL },
{ N_("Close"), pattern_select_close_callback, NULL, NULL }
};
gint NUM_PATTERN_COLUMNS = 6;
......@@ -198,7 +198,7 @@ pattern_select_new (gchar * title,
/* The action area */
action_items[0].user_data = psp;
action_items[1].user_data = psp;
build_action_area (GTK_DIALOG (psp->shell), action_items, 2, 0);
build_action_area (GTK_DIALOG (psp->shell), action_items, 2, 1);
gtk_widget_show (psp->options_box);
gtk_widget_show (vbox);
......
This diff is collapsed.
......@@ -55,8 +55,8 @@ static void palette_select_edit_callback (GtkWidget *w,gpointer client_data)
static ActionAreaItem action_items[2] =
{
{ N_("Close"), palette_select_close_callback, NULL, NULL },
{ N_("Edit"), palette_select_edit_callback, NULL, NULL },
{ N_("Close"), palette_select_close_callback, NULL, NULL }
};
void
......
......@@ -73,8 +73,8 @@ static void pattern_select_scroll_update (GtkAdjustment *, gpointer);
/* the action area structure */
static ActionAreaItem action_items[2] =
{
{ N_("Close"), pattern_select_close_callback, NULL, NULL },
{ N_("Refresh"), pattern_select_refresh_callback, NULL, NULL },
{ N_("Close"), pattern_select_close_callback, NULL, NULL }
};
gint NUM_PATTERN_COLUMNS = 6;
......@@ -198,7 +198,7 @@ pattern_select_new (gchar * title,
/* The action area */
action_items[0].user_data = psp;
action_items[1].user_data = psp;
build_action_area (GTK_DIALOG (psp->shell), action_items, 2, 0);
build_action_area (GTK_DIALOG (psp->shell), action_items, 2, 1);
gtk_widget_show (psp->options_box);
gtk_widget_show (vbox);
......
This diff is collapsed.
......@@ -119,8 +119,8 @@ int current_device = GDK_CORE_POINTER;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("Close"), devices_close_callback, NULL, NULL },
{ N_("Save"), (ActionCallback)devices_write_rc, NULL, NULL },
{ N_("Close"), devices_close_callback, NULL, NULL }
};
void
......@@ -765,8 +765,8 @@ create_device_status (void)
i++;
}
action_items[0].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 0);
action_items[1].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 1);
deviceD->current = 0xffffffff; /* random, but doesn't matter */
device_status_update_current ();
......
......@@ -119,8 +119,8 @@ int current_device = GDK_CORE_POINTER;
/* the action area structure */
static ActionAreaItem action_items[] =
{
{ N_("Close"), devices_close_callback, NULL, NULL },
{ N_("Save"), (ActionCallback)devices_write_rc, NULL, NULL },
{ N_("Close"), devices_close_callback, NULL, NULL }
};
void
......@@ -765,8 +765,8 @@ create_device_status (void)
i++;
}
action_items[0].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 0);
action_items[1].user_data = deviceD->shell;
build_action_area (GTK_DIALOG (deviceD->shell), action_items, 2, 1);
deviceD->current = 0xffffffff; /* random, but doesn't matter */
device_status_update_current ();
......
......@@ -115,7 +115,7 @@ gimp_file_selection_init (GimpFileSelection *gfs)
gtk_widget_show (gfs->browse_button);
gfs->entry = gtk_entry_new ();
gtk_box_pack_end (GTK_BOX (gfs), gfs->entry, TRUE, TRUE, 5);
gtk_box_pack_end (GTK_BOX (gfs), gfs->entry, TRUE, TRUE, 2);
gtk_signal_connect (GTK_OBJECT(gfs->entry), "activate",
(GtkSignalFunc) gimp_file_selection_entry_callback, gfs);
gtk_signal_connect (GTK_OBJECT(gfs->entry), "focus_out_event",
......
......@@ -93,7 +93,7 @@ gimp_path_editor_init (GimpPathEditor *gpe)
gpe->selected_item = NULL;
gpe->number_of_items = 0;
gpe->upper_hbox = gtk_hbox_new (FALSE, 5);
gpe->upper_hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (gpe), gpe->upper_hbox, FALSE, TRUE, 0);
gtk_widget_show (gpe->upper_hbox);
......@@ -129,7 +129,7 @@ gimp_path_editor_init (GimpPathEditor *gpe)
scrolled_window =
gtk_scrolled_window_new (GTK_ADJUSTMENT (hadjustment),
GTK_ADJUSTMENT (vadjustment));
gtk_box_pack_start (GTK_BOX (gpe), scrolled_window, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gpe), scrolled_window, TRUE, TRUE, 2);
gtk_widget_show (scrolled_window);
gpe->dir_list = gtk_list_new ();
......
......@@ -152,7 +152,7 @@ static ColorSelectFillUpdateProc update_procs[] =
static ActionAreaItem action_items[2] =
{
{ N_("OK"), color_select_ok_callback, NULL, NULL },
{ N_("Cancel"), color_select_cancel_callback, NULL, NULL },
{ N_("Cancel"), color_select_cancel_callback, NULL, NULL }
};
ColorSelectP
......
......@@ -115,7 +115,7 @@ gimp_file_selection_init (GimpFileSelection *gfs)
gtk_widget_show (gfs->browse_button);
gfs->entry = gtk_entry_new ();
gtk_box_pack_end (GTK_BOX (gfs), gfs->entry, TRUE, TRUE, 5);
gtk_box_pack_end (GTK_BOX (gfs), gfs->entry, TRUE, TRUE, 2);
gtk_signal_connect (GTK_OBJECT(gfs->entry), "activate",
(GtkSignalFunc) gimp_file_selection_entry_callback, gfs);
gtk_signal_connect (GTK_OBJECT(gfs->entry), "focus_out_event",
......
......@@ -115,7 +115,7 @@ gimp_file_selection_init (GimpFileSelection *gfs)
gtk_widget_show (gfs->browse_button);
gfs->entry = gtk_entry_new ();
gtk_box_pack_end (GTK_BOX (gfs), gfs->entry, TRUE, TRUE, 5);
gtk_box_pack_end (GTK_BOX (gfs), gfs->entry, TRUE, TRUE, 2);
gtk_signal_connect (GTK_OBJECT(gfs->entry), "activate",
(GtkSignalFunc) gimp_file_selection_entry_callback, gfs);
gtk_signal_connect (GTK_OBJECT(gfs->entry), "focus_out_event",
......
......@@ -93,7 +93,7 @@ gimp_path_editor_init (GimpPathEditor *gpe)
gpe->selected_item = NULL;
gpe->number_of_items = 0;
gpe->upper_hbox = gtk_hbox_new (FALSE, 5);
gpe->upper_hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (gpe), gpe->upper_hbox, FALSE, TRUE, 0);
gtk_widget_show (gpe->upper_hbox);
......@@ -129,7 +129,7 @@ gimp_path_editor_init (GimpPathEditor *gpe)
scrolled_window =
gtk_scrolled_window_new (GTK_ADJUSTMENT (hadjustment),
GTK_ADJUSTMENT (vadjustment));
gtk_box_pack_start (GTK_BOX (gpe), scrolled_window, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gpe), scrolled_window, TRUE, TRUE, 2);
gtk_widget_show (scrolled_window);
gpe->dir_list = gtk_list_new ();
......
......@@ -97,6 +97,8 @@ colorsel_gtk_new (int r, int g, int b,
/* RETURNS: */
void **selector_data)
{
GtkWidget *hbox;
GtkWidget *vbox;
ColorselGtk *p;
p = g_malloc (sizeof (ColorselGtk));
......@@ -110,8 +112,16 @@ colorsel_gtk_new (int r, int g, int b,
gtk_signal_connect (GTK_OBJECT (p->selector), "color_changed",
(GtkSignalFunc) colorsel_gtk_update, p);
vbox = gtk_vbox_new (TRUE, 0);
gtk_box_pack_start (GTK_BOX (vbox), p->selector, FALSE, FALSE, 0);
gtk_widget_show (p->selector);
gtk_widget_show (vbox);
hbox = gtk_hbox_new (TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
(*selector_data) = p;
return p->selector;
return hbox;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment