mirror of https://github.com/GNOME/gimp.git
removed two unused directories from plug-in-path.
1999-03-14 Michael Natterer <mitschel@cs.tu-berlin.de> * gimprc.in: removed two unused directories from plug-in-path. * app/file_new_dialog.c: make the first spinbutton grab the focus and one more unit initialisation bugfix * app/interface.c: grab focus in query_[string|int|..]_box() This still needs to be done in many dialogs to be consistent. * app/preferences_dialog.c: made the module-path configurable * libgimp/gimppatheditor.[ch]: change the order of the buttons to match the order in the L&C dialog * libgimp/gimpsizeentry.[ch]: enabled highlighting of the spinbuttons' contents on focus_in_event. Ugly new function gimp_size_entry_grab_focus() because it seems impossible to implement gtk_widget_grab_focus(sizeentry).
This commit is contained in:
parent
595514ed61
commit
844a73d33f
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
||||||
|
1999-03-14 Michael Natterer <mitschel@cs.tu-berlin.de>
|
||||||
|
|
||||||
|
* gimprc.in: removed two unused directories from plug-in-path.
|
||||||
|
|
||||||
|
* app/file_new_dialog.c: make the first spinbutton grab the focus
|
||||||
|
and one more unit initialisation bugfix
|
||||||
|
|
||||||
|
* app/interface.c: grab focus in query_[string|int|..]_box()
|
||||||
|
This still needs to be done in many dialogs to be consistent.
|
||||||
|
|
||||||
|
* app/preferences_dialog.c: made the module-path configurable
|
||||||
|
|
||||||
|
* libgimp/gimppatheditor.[ch]: change the order of the buttons to
|
||||||
|
match the order in the L&C dialog
|
||||||
|
|
||||||
|
* libgimp/gimpsizeentry.[ch]: enabled highlighting of the
|
||||||
|
spinbuttons' contents on focus_in_event.
|
||||||
|
Ugly new function gimp_size_entry_grab_focus() because it seems
|
||||||
|
impossible to implement gtk_widget_grab_focus(sizeentry).
|
||||||
|
|
||||||
Sun Mar 14 17:56:14 MET 1999 Sven Neumann <sven@gimp.org>
|
Sun Mar 14 17:56:14 MET 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/preferences_dialog.c: correctly set the status of the
|
* app/preferences_dialog.c: correctly set the status of the
|
||||||
|
|
|
@ -298,7 +298,7 @@ file_new_cmd_callback (GtkWidget *widget,
|
||||||
vals->xresolution = gdisp->gimage->xresolution;
|
vals->xresolution = gdisp->gimage->xresolution;
|
||||||
vals->yresolution = gdisp->gimage->yresolution;
|
vals->yresolution = gdisp->gimage->yresolution;
|
||||||
vals->unit = gdisp->gimage->unit;
|
vals->unit = gdisp->gimage->unit;
|
||||||
vals->res_unit = UNIT_INCH;
|
vals->res_unit = last_res_unit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -393,6 +393,7 @@ file_new_cmd_callback (GtkWidget *widget,
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vals->size_sizeentry), 4);
|
gtk_container_set_border_width (GTK_CONTAINER (vals->size_sizeentry), 4);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), vals->size_sizeentry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), vals->size_sizeentry, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (vals->size_sizeentry));
|
||||||
gtk_widget_show (vals->size_sizeentry);
|
gtk_widget_show (vals->size_sizeentry);
|
||||||
|
|
||||||
/* resolution frame */
|
/* resolution frame */
|
||||||
|
|
|
@ -107,6 +107,7 @@ static char * old_brush_path;
|
||||||
static char * old_pattern_path;
|
static char * old_pattern_path;
|
||||||
static char * old_palette_path;
|
static char * old_palette_path;
|
||||||
static char * old_plug_in_path;
|
static char * old_plug_in_path;
|
||||||
|
static char * old_module_path;
|
||||||
static char * old_gradient_path;
|
static char * old_gradient_path;
|
||||||
static float old_monitor_xres;
|
static float old_monitor_xres;
|
||||||
static float old_monitor_yres;
|
static float old_monitor_yres;
|
||||||
|
@ -120,6 +121,7 @@ static char * edit_brush_path = NULL;
|
||||||
static char * edit_pattern_path = NULL;
|
static char * edit_pattern_path = NULL;
|
||||||
static char * edit_palette_path = NULL;
|
static char * edit_palette_path = NULL;
|
||||||
static char * edit_plug_in_path = NULL;
|
static char * edit_plug_in_path = NULL;
|
||||||
|
static char * edit_module_path = NULL;
|
||||||
static char * edit_gradient_path = NULL;
|
static char * edit_gradient_path = NULL;
|
||||||
static int edit_stingy_memory_use;
|
static int edit_stingy_memory_use;
|
||||||
static int edit_tile_cache_size;
|
static int edit_tile_cache_size;
|
||||||
|
@ -320,6 +322,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
gchar *save_pattern_path;
|
gchar *save_pattern_path;
|
||||||
gchar *save_palette_path;
|
gchar *save_palette_path;
|
||||||
gchar *save_plug_in_path;
|
gchar *save_plug_in_path;
|
||||||
|
gchar *save_module_path;
|
||||||
gchar *save_gradient_path;
|
gchar *save_gradient_path;
|
||||||
int restart_notification = FALSE;
|
int restart_notification = FALSE;
|
||||||
|
|
||||||
|
@ -337,6 +340,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
save_pattern_path = pattern_path;
|
save_pattern_path = pattern_path;
|
||||||
save_palette_path = palette_path;
|
save_palette_path = palette_path;
|
||||||
save_plug_in_path = plug_in_path;
|
save_plug_in_path = plug_in_path;
|
||||||
|
save_module_path = module_path;
|
||||||
save_gradient_path = gradient_path;
|
save_gradient_path = gradient_path;
|
||||||
save_num_processors = num_processors;
|
save_num_processors = num_processors;
|
||||||
|
|
||||||
|
@ -490,6 +494,12 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
plug_in_path = edit_plug_in_path;
|
plug_in_path = edit_plug_in_path;
|
||||||
restart_notification = TRUE;
|
restart_notification = TRUE;
|
||||||
}
|
}
|
||||||
|
if (file_prefs_strcmp (module_path, edit_module_path))
|
||||||
|
{
|
||||||
|
update = g_list_append (update, "module-path");
|
||||||
|
module_path = edit_module_path;
|
||||||
|
restart_notification = TRUE;
|
||||||
|
}
|
||||||
if (file_prefs_strcmp (gradient_path, edit_gradient_path))
|
if (file_prefs_strcmp (gradient_path, edit_gradient_path))
|
||||||
{
|
{
|
||||||
update = g_list_append (update, "gradient-path");
|
update = g_list_append (update, "gradient-path");
|
||||||
|
@ -523,6 +533,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
pattern_path = save_pattern_path;
|
pattern_path = save_pattern_path;
|
||||||
palette_path = save_palette_path;
|
palette_path = save_palette_path;
|
||||||
plug_in_path = save_plug_in_path;
|
plug_in_path = save_plug_in_path;
|
||||||
|
module_path = save_module_path;
|
||||||
gradient_path = save_gradient_path;
|
gradient_path = save_gradient_path;
|
||||||
|
|
||||||
if (restart_notification)
|
if (restart_notification)
|
||||||
|
@ -611,6 +622,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
|
||||||
file_prefs_strset (&edit_pattern_path, old_pattern_path);
|
file_prefs_strset (&edit_pattern_path, old_pattern_path);
|
||||||
file_prefs_strset (&edit_palette_path, old_palette_path);
|
file_prefs_strset (&edit_palette_path, old_palette_path);
|
||||||
file_prefs_strset (&edit_plug_in_path, old_plug_in_path);
|
file_prefs_strset (&edit_plug_in_path, old_plug_in_path);
|
||||||
|
file_prefs_strset (&edit_module_path, old_module_path);
|
||||||
file_prefs_strset (&edit_gradient_path, old_gradient_path);
|
file_prefs_strset (&edit_gradient_path, old_gradient_path);
|
||||||
|
|
||||||
file_prefs_strset (&image_title_format, old_image_title_format);
|
file_prefs_strset (&image_title_format, old_image_title_format);
|
||||||
|
@ -975,8 +987,9 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
{N_("Brushes"), N_("Select Brushes Dir"), &edit_brush_path},
|
{N_("Brushes"), N_("Select Brushes Dir"), &edit_brush_path},
|
||||||
{N_("Gradients"), N_("Select Gradients Dir"), &edit_gradient_path},
|
{N_("Gradients"), N_("Select Gradients Dir"), &edit_gradient_path},
|
||||||
{N_("Patterns"), N_("Select Patterns Dir"), &edit_pattern_path},
|
{N_("Patterns"), N_("Select Patterns Dir"), &edit_pattern_path},
|
||||||
{N_("Palettes"), N_("Select Palette Dir"), &edit_palette_path},
|
{N_("Palettes"), N_("Select Palettes Dir"), &edit_palette_path},
|
||||||
{N_("Plug-ins"), N_("Select Plug-in Dir"), &edit_plug_in_path}
|
{N_("Plug-ins"), N_("Select Plug-ins Dir"), &edit_plug_in_path},
|
||||||
|
{N_("Modules"), N_("Select Modules Dir"), &edit_module_path}
|
||||||
};
|
};
|
||||||
static const struct {
|
static const struct {
|
||||||
char *label;
|
char *label;
|
||||||
|
@ -1008,6 +1021,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
edit_pattern_path = file_prefs_strdup (pattern_path);
|
edit_pattern_path = file_prefs_strdup (pattern_path);
|
||||||
edit_palette_path = file_prefs_strdup (palette_path);
|
edit_palette_path = file_prefs_strdup (palette_path);
|
||||||
edit_plug_in_path = file_prefs_strdup (plug_in_path);
|
edit_plug_in_path = file_prefs_strdup (plug_in_path);
|
||||||
|
edit_module_path = file_prefs_strdup (module_path);
|
||||||
edit_gradient_path = file_prefs_strdup (gradient_path);
|
edit_gradient_path = file_prefs_strdup (gradient_path);
|
||||||
edit_stingy_memory_use = stingy_memory_use;
|
edit_stingy_memory_use = stingy_memory_use;
|
||||||
edit_tile_cache_size = tile_cache_size;
|
edit_tile_cache_size = tile_cache_size;
|
||||||
|
@ -1056,6 +1070,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
file_prefs_strset (&old_pattern_path, edit_pattern_path);
|
file_prefs_strset (&old_pattern_path, edit_pattern_path);
|
||||||
file_prefs_strset (&old_palette_path, edit_palette_path);
|
file_prefs_strset (&old_palette_path, edit_palette_path);
|
||||||
file_prefs_strset (&old_plug_in_path, edit_plug_in_path);
|
file_prefs_strset (&old_plug_in_path, edit_plug_in_path);
|
||||||
|
file_prefs_strset (&old_module_path, edit_module_path);
|
||||||
file_prefs_strset (&old_gradient_path, edit_gradient_path);
|
file_prefs_strset (&old_gradient_path, edit_gradient_path);
|
||||||
|
|
||||||
for (i = 0; i < nmem_size_units; i++)
|
for (i = 0; i < nmem_size_units; i++)
|
||||||
|
|
|
@ -914,6 +914,7 @@ query_string_box (char *title,
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, TRUE, TRUE, 0);
|
||||||
if (initial)
|
if (initial)
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), gettext(initial));
|
gtk_entry_set_text (GTK_ENTRY (entry), gettext(initial));
|
||||||
|
gtk_widget_grab_focus (entry);
|
||||||
gtk_widget_show (entry);
|
gtk_widget_show (entry);
|
||||||
|
|
||||||
query_box->entry = entry;
|
query_box->entry = entry;
|
||||||
|
@ -947,6 +948,7 @@ query_int_box (char *title,
|
||||||
1, 10, 0));
|
1, 10, 0));
|
||||||
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
|
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
||||||
|
gtk_widget_grab_focus (spinbutton);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
query_box->entry = spinbutton;
|
query_box->entry = spinbutton;
|
||||||
|
@ -981,6 +983,7 @@ query_float_box (char *title,
|
||||||
1, 10, 0));
|
1, 10, 0));
|
||||||
spinbutton = gtk_spin_button_new (adjustment, 1.0, digits);
|
spinbutton = gtk_spin_button_new (adjustment, 1.0, digits);
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
||||||
|
gtk_widget_grab_focus (spinbutton);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
query_box->entry = spinbutton;
|
query_box->entry = spinbutton;
|
||||||
|
@ -1022,6 +1025,7 @@ query_size_box (char *title,
|
||||||
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial);
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, TRUE, TRUE, 0);
|
||||||
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (sizeentry));
|
||||||
gtk_widget_show (sizeentry);
|
gtk_widget_show (sizeentry);
|
||||||
|
|
||||||
query_box->entry = sizeentry;
|
query_box->entry = sizeentry;
|
||||||
|
|
|
@ -914,6 +914,7 @@ query_string_box (char *title,
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, TRUE, TRUE, 0);
|
||||||
if (initial)
|
if (initial)
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), gettext(initial));
|
gtk_entry_set_text (GTK_ENTRY (entry), gettext(initial));
|
||||||
|
gtk_widget_grab_focus (entry);
|
||||||
gtk_widget_show (entry);
|
gtk_widget_show (entry);
|
||||||
|
|
||||||
query_box->entry = entry;
|
query_box->entry = entry;
|
||||||
|
@ -947,6 +948,7 @@ query_int_box (char *title,
|
||||||
1, 10, 0));
|
1, 10, 0));
|
||||||
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
|
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
||||||
|
gtk_widget_grab_focus (spinbutton);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
query_box->entry = spinbutton;
|
query_box->entry = spinbutton;
|
||||||
|
@ -981,6 +983,7 @@ query_float_box (char *title,
|
||||||
1, 10, 0));
|
1, 10, 0));
|
||||||
spinbutton = gtk_spin_button_new (adjustment, 1.0, digits);
|
spinbutton = gtk_spin_button_new (adjustment, 1.0, digits);
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
||||||
|
gtk_widget_grab_focus (spinbutton);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
query_box->entry = spinbutton;
|
query_box->entry = spinbutton;
|
||||||
|
@ -1022,6 +1025,7 @@ query_size_box (char *title,
|
||||||
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial);
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, TRUE, TRUE, 0);
|
||||||
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (sizeentry));
|
||||||
gtk_widget_show (sizeentry);
|
gtk_widget_show (sizeentry);
|
||||||
|
|
||||||
query_box->entry = sizeentry;
|
query_box->entry = sizeentry;
|
||||||
|
|
|
@ -298,7 +298,7 @@ file_new_cmd_callback (GtkWidget *widget,
|
||||||
vals->xresolution = gdisp->gimage->xresolution;
|
vals->xresolution = gdisp->gimage->xresolution;
|
||||||
vals->yresolution = gdisp->gimage->yresolution;
|
vals->yresolution = gdisp->gimage->yresolution;
|
||||||
vals->unit = gdisp->gimage->unit;
|
vals->unit = gdisp->gimage->unit;
|
||||||
vals->res_unit = UNIT_INCH;
|
vals->res_unit = last_res_unit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -393,6 +393,7 @@ file_new_cmd_callback (GtkWidget *widget,
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vals->size_sizeentry), 4);
|
gtk_container_set_border_width (GTK_CONTAINER (vals->size_sizeentry), 4);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), vals->size_sizeentry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), vals->size_sizeentry, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (vals->size_sizeentry));
|
||||||
gtk_widget_show (vals->size_sizeentry);
|
gtk_widget_show (vals->size_sizeentry);
|
||||||
|
|
||||||
/* resolution frame */
|
/* resolution frame */
|
||||||
|
|
|
@ -298,7 +298,7 @@ file_new_cmd_callback (GtkWidget *widget,
|
||||||
vals->xresolution = gdisp->gimage->xresolution;
|
vals->xresolution = gdisp->gimage->xresolution;
|
||||||
vals->yresolution = gdisp->gimage->yresolution;
|
vals->yresolution = gdisp->gimage->yresolution;
|
||||||
vals->unit = gdisp->gimage->unit;
|
vals->unit = gdisp->gimage->unit;
|
||||||
vals->res_unit = UNIT_INCH;
|
vals->res_unit = last_res_unit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -393,6 +393,7 @@ file_new_cmd_callback (GtkWidget *widget,
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vals->size_sizeentry), 4);
|
gtk_container_set_border_width (GTK_CONTAINER (vals->size_sizeentry), 4);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), vals->size_sizeentry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), vals->size_sizeentry, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (vals->size_sizeentry));
|
||||||
gtk_widget_show (vals->size_sizeentry);
|
gtk_widget_show (vals->size_sizeentry);
|
||||||
|
|
||||||
/* resolution frame */
|
/* resolution frame */
|
||||||
|
|
|
@ -107,6 +107,7 @@ static char * old_brush_path;
|
||||||
static char * old_pattern_path;
|
static char * old_pattern_path;
|
||||||
static char * old_palette_path;
|
static char * old_palette_path;
|
||||||
static char * old_plug_in_path;
|
static char * old_plug_in_path;
|
||||||
|
static char * old_module_path;
|
||||||
static char * old_gradient_path;
|
static char * old_gradient_path;
|
||||||
static float old_monitor_xres;
|
static float old_monitor_xres;
|
||||||
static float old_monitor_yres;
|
static float old_monitor_yres;
|
||||||
|
@ -120,6 +121,7 @@ static char * edit_brush_path = NULL;
|
||||||
static char * edit_pattern_path = NULL;
|
static char * edit_pattern_path = NULL;
|
||||||
static char * edit_palette_path = NULL;
|
static char * edit_palette_path = NULL;
|
||||||
static char * edit_plug_in_path = NULL;
|
static char * edit_plug_in_path = NULL;
|
||||||
|
static char * edit_module_path = NULL;
|
||||||
static char * edit_gradient_path = NULL;
|
static char * edit_gradient_path = NULL;
|
||||||
static int edit_stingy_memory_use;
|
static int edit_stingy_memory_use;
|
||||||
static int edit_tile_cache_size;
|
static int edit_tile_cache_size;
|
||||||
|
@ -320,6 +322,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
gchar *save_pattern_path;
|
gchar *save_pattern_path;
|
||||||
gchar *save_palette_path;
|
gchar *save_palette_path;
|
||||||
gchar *save_plug_in_path;
|
gchar *save_plug_in_path;
|
||||||
|
gchar *save_module_path;
|
||||||
gchar *save_gradient_path;
|
gchar *save_gradient_path;
|
||||||
int restart_notification = FALSE;
|
int restart_notification = FALSE;
|
||||||
|
|
||||||
|
@ -337,6 +340,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
save_pattern_path = pattern_path;
|
save_pattern_path = pattern_path;
|
||||||
save_palette_path = palette_path;
|
save_palette_path = palette_path;
|
||||||
save_plug_in_path = plug_in_path;
|
save_plug_in_path = plug_in_path;
|
||||||
|
save_module_path = module_path;
|
||||||
save_gradient_path = gradient_path;
|
save_gradient_path = gradient_path;
|
||||||
save_num_processors = num_processors;
|
save_num_processors = num_processors;
|
||||||
|
|
||||||
|
@ -490,6 +494,12 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
plug_in_path = edit_plug_in_path;
|
plug_in_path = edit_plug_in_path;
|
||||||
restart_notification = TRUE;
|
restart_notification = TRUE;
|
||||||
}
|
}
|
||||||
|
if (file_prefs_strcmp (module_path, edit_module_path))
|
||||||
|
{
|
||||||
|
update = g_list_append (update, "module-path");
|
||||||
|
module_path = edit_module_path;
|
||||||
|
restart_notification = TRUE;
|
||||||
|
}
|
||||||
if (file_prefs_strcmp (gradient_path, edit_gradient_path))
|
if (file_prefs_strcmp (gradient_path, edit_gradient_path))
|
||||||
{
|
{
|
||||||
update = g_list_append (update, "gradient-path");
|
update = g_list_append (update, "gradient-path");
|
||||||
|
@ -523,6 +533,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
pattern_path = save_pattern_path;
|
pattern_path = save_pattern_path;
|
||||||
palette_path = save_palette_path;
|
palette_path = save_palette_path;
|
||||||
plug_in_path = save_plug_in_path;
|
plug_in_path = save_plug_in_path;
|
||||||
|
module_path = save_module_path;
|
||||||
gradient_path = save_gradient_path;
|
gradient_path = save_gradient_path;
|
||||||
|
|
||||||
if (restart_notification)
|
if (restart_notification)
|
||||||
|
@ -611,6 +622,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
|
||||||
file_prefs_strset (&edit_pattern_path, old_pattern_path);
|
file_prefs_strset (&edit_pattern_path, old_pattern_path);
|
||||||
file_prefs_strset (&edit_palette_path, old_palette_path);
|
file_prefs_strset (&edit_palette_path, old_palette_path);
|
||||||
file_prefs_strset (&edit_plug_in_path, old_plug_in_path);
|
file_prefs_strset (&edit_plug_in_path, old_plug_in_path);
|
||||||
|
file_prefs_strset (&edit_module_path, old_module_path);
|
||||||
file_prefs_strset (&edit_gradient_path, old_gradient_path);
|
file_prefs_strset (&edit_gradient_path, old_gradient_path);
|
||||||
|
|
||||||
file_prefs_strset (&image_title_format, old_image_title_format);
|
file_prefs_strset (&image_title_format, old_image_title_format);
|
||||||
|
@ -975,8 +987,9 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
{N_("Brushes"), N_("Select Brushes Dir"), &edit_brush_path},
|
{N_("Brushes"), N_("Select Brushes Dir"), &edit_brush_path},
|
||||||
{N_("Gradients"), N_("Select Gradients Dir"), &edit_gradient_path},
|
{N_("Gradients"), N_("Select Gradients Dir"), &edit_gradient_path},
|
||||||
{N_("Patterns"), N_("Select Patterns Dir"), &edit_pattern_path},
|
{N_("Patterns"), N_("Select Patterns Dir"), &edit_pattern_path},
|
||||||
{N_("Palettes"), N_("Select Palette Dir"), &edit_palette_path},
|
{N_("Palettes"), N_("Select Palettes Dir"), &edit_palette_path},
|
||||||
{N_("Plug-ins"), N_("Select Plug-in Dir"), &edit_plug_in_path}
|
{N_("Plug-ins"), N_("Select Plug-ins Dir"), &edit_plug_in_path},
|
||||||
|
{N_("Modules"), N_("Select Modules Dir"), &edit_module_path}
|
||||||
};
|
};
|
||||||
static const struct {
|
static const struct {
|
||||||
char *label;
|
char *label;
|
||||||
|
@ -1008,6 +1021,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
edit_pattern_path = file_prefs_strdup (pattern_path);
|
edit_pattern_path = file_prefs_strdup (pattern_path);
|
||||||
edit_palette_path = file_prefs_strdup (palette_path);
|
edit_palette_path = file_prefs_strdup (palette_path);
|
||||||
edit_plug_in_path = file_prefs_strdup (plug_in_path);
|
edit_plug_in_path = file_prefs_strdup (plug_in_path);
|
||||||
|
edit_module_path = file_prefs_strdup (module_path);
|
||||||
edit_gradient_path = file_prefs_strdup (gradient_path);
|
edit_gradient_path = file_prefs_strdup (gradient_path);
|
||||||
edit_stingy_memory_use = stingy_memory_use;
|
edit_stingy_memory_use = stingy_memory_use;
|
||||||
edit_tile_cache_size = tile_cache_size;
|
edit_tile_cache_size = tile_cache_size;
|
||||||
|
@ -1056,6 +1070,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
file_prefs_strset (&old_pattern_path, edit_pattern_path);
|
file_prefs_strset (&old_pattern_path, edit_pattern_path);
|
||||||
file_prefs_strset (&old_palette_path, edit_palette_path);
|
file_prefs_strset (&old_palette_path, edit_palette_path);
|
||||||
file_prefs_strset (&old_plug_in_path, edit_plug_in_path);
|
file_prefs_strset (&old_plug_in_path, edit_plug_in_path);
|
||||||
|
file_prefs_strset (&old_module_path, edit_module_path);
|
||||||
file_prefs_strset (&old_gradient_path, edit_gradient_path);
|
file_prefs_strset (&old_gradient_path, edit_gradient_path);
|
||||||
|
|
||||||
for (i = 0; i < nmem_size_units; i++)
|
for (i = 0; i < nmem_size_units; i++)
|
||||||
|
|
|
@ -914,6 +914,7 @@ query_string_box (char *title,
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, TRUE, TRUE, 0);
|
||||||
if (initial)
|
if (initial)
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), gettext(initial));
|
gtk_entry_set_text (GTK_ENTRY (entry), gettext(initial));
|
||||||
|
gtk_widget_grab_focus (entry);
|
||||||
gtk_widget_show (entry);
|
gtk_widget_show (entry);
|
||||||
|
|
||||||
query_box->entry = entry;
|
query_box->entry = entry;
|
||||||
|
@ -947,6 +948,7 @@ query_int_box (char *title,
|
||||||
1, 10, 0));
|
1, 10, 0));
|
||||||
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
|
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
||||||
|
gtk_widget_grab_focus (spinbutton);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
query_box->entry = spinbutton;
|
query_box->entry = spinbutton;
|
||||||
|
@ -981,6 +983,7 @@ query_float_box (char *title,
|
||||||
1, 10, 0));
|
1, 10, 0));
|
||||||
spinbutton = gtk_spin_button_new (adjustment, 1.0, digits);
|
spinbutton = gtk_spin_button_new (adjustment, 1.0, digits);
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, TRUE, TRUE, 0);
|
||||||
|
gtk_widget_grab_focus (spinbutton);
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
query_box->entry = spinbutton;
|
query_box->entry = spinbutton;
|
||||||
|
@ -1022,6 +1025,7 @@ query_size_box (char *title,
|
||||||
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial);
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, TRUE, TRUE, 0);
|
||||||
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (sizeentry));
|
||||||
gtk_widget_show (sizeentry);
|
gtk_widget_show (sizeentry);
|
||||||
|
|
||||||
query_box->entry = sizeentry;
|
query_box->entry = sizeentry;
|
||||||
|
|
|
@ -107,6 +107,7 @@ static char * old_brush_path;
|
||||||
static char * old_pattern_path;
|
static char * old_pattern_path;
|
||||||
static char * old_palette_path;
|
static char * old_palette_path;
|
||||||
static char * old_plug_in_path;
|
static char * old_plug_in_path;
|
||||||
|
static char * old_module_path;
|
||||||
static char * old_gradient_path;
|
static char * old_gradient_path;
|
||||||
static float old_monitor_xres;
|
static float old_monitor_xres;
|
||||||
static float old_monitor_yres;
|
static float old_monitor_yres;
|
||||||
|
@ -120,6 +121,7 @@ static char * edit_brush_path = NULL;
|
||||||
static char * edit_pattern_path = NULL;
|
static char * edit_pattern_path = NULL;
|
||||||
static char * edit_palette_path = NULL;
|
static char * edit_palette_path = NULL;
|
||||||
static char * edit_plug_in_path = NULL;
|
static char * edit_plug_in_path = NULL;
|
||||||
|
static char * edit_module_path = NULL;
|
||||||
static char * edit_gradient_path = NULL;
|
static char * edit_gradient_path = NULL;
|
||||||
static int edit_stingy_memory_use;
|
static int edit_stingy_memory_use;
|
||||||
static int edit_tile_cache_size;
|
static int edit_tile_cache_size;
|
||||||
|
@ -320,6 +322,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
gchar *save_pattern_path;
|
gchar *save_pattern_path;
|
||||||
gchar *save_palette_path;
|
gchar *save_palette_path;
|
||||||
gchar *save_plug_in_path;
|
gchar *save_plug_in_path;
|
||||||
|
gchar *save_module_path;
|
||||||
gchar *save_gradient_path;
|
gchar *save_gradient_path;
|
||||||
int restart_notification = FALSE;
|
int restart_notification = FALSE;
|
||||||
|
|
||||||
|
@ -337,6 +340,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
save_pattern_path = pattern_path;
|
save_pattern_path = pattern_path;
|
||||||
save_palette_path = palette_path;
|
save_palette_path = palette_path;
|
||||||
save_plug_in_path = plug_in_path;
|
save_plug_in_path = plug_in_path;
|
||||||
|
save_module_path = module_path;
|
||||||
save_gradient_path = gradient_path;
|
save_gradient_path = gradient_path;
|
||||||
save_num_processors = num_processors;
|
save_num_processors = num_processors;
|
||||||
|
|
||||||
|
@ -490,6 +494,12 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
plug_in_path = edit_plug_in_path;
|
plug_in_path = edit_plug_in_path;
|
||||||
restart_notification = TRUE;
|
restart_notification = TRUE;
|
||||||
}
|
}
|
||||||
|
if (file_prefs_strcmp (module_path, edit_module_path))
|
||||||
|
{
|
||||||
|
update = g_list_append (update, "module-path");
|
||||||
|
module_path = edit_module_path;
|
||||||
|
restart_notification = TRUE;
|
||||||
|
}
|
||||||
if (file_prefs_strcmp (gradient_path, edit_gradient_path))
|
if (file_prefs_strcmp (gradient_path, edit_gradient_path))
|
||||||
{
|
{
|
||||||
update = g_list_append (update, "gradient-path");
|
update = g_list_append (update, "gradient-path");
|
||||||
|
@ -523,6 +533,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
||||||
pattern_path = save_pattern_path;
|
pattern_path = save_pattern_path;
|
||||||
palette_path = save_palette_path;
|
palette_path = save_palette_path;
|
||||||
plug_in_path = save_plug_in_path;
|
plug_in_path = save_plug_in_path;
|
||||||
|
module_path = save_module_path;
|
||||||
gradient_path = save_gradient_path;
|
gradient_path = save_gradient_path;
|
||||||
|
|
||||||
if (restart_notification)
|
if (restart_notification)
|
||||||
|
@ -611,6 +622,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
|
||||||
file_prefs_strset (&edit_pattern_path, old_pattern_path);
|
file_prefs_strset (&edit_pattern_path, old_pattern_path);
|
||||||
file_prefs_strset (&edit_palette_path, old_palette_path);
|
file_prefs_strset (&edit_palette_path, old_palette_path);
|
||||||
file_prefs_strset (&edit_plug_in_path, old_plug_in_path);
|
file_prefs_strset (&edit_plug_in_path, old_plug_in_path);
|
||||||
|
file_prefs_strset (&edit_module_path, old_module_path);
|
||||||
file_prefs_strset (&edit_gradient_path, old_gradient_path);
|
file_prefs_strset (&edit_gradient_path, old_gradient_path);
|
||||||
|
|
||||||
file_prefs_strset (&image_title_format, old_image_title_format);
|
file_prefs_strset (&image_title_format, old_image_title_format);
|
||||||
|
@ -975,8 +987,9 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
{N_("Brushes"), N_("Select Brushes Dir"), &edit_brush_path},
|
{N_("Brushes"), N_("Select Brushes Dir"), &edit_brush_path},
|
||||||
{N_("Gradients"), N_("Select Gradients Dir"), &edit_gradient_path},
|
{N_("Gradients"), N_("Select Gradients Dir"), &edit_gradient_path},
|
||||||
{N_("Patterns"), N_("Select Patterns Dir"), &edit_pattern_path},
|
{N_("Patterns"), N_("Select Patterns Dir"), &edit_pattern_path},
|
||||||
{N_("Palettes"), N_("Select Palette Dir"), &edit_palette_path},
|
{N_("Palettes"), N_("Select Palettes Dir"), &edit_palette_path},
|
||||||
{N_("Plug-ins"), N_("Select Plug-in Dir"), &edit_plug_in_path}
|
{N_("Plug-ins"), N_("Select Plug-ins Dir"), &edit_plug_in_path},
|
||||||
|
{N_("Modules"), N_("Select Modules Dir"), &edit_module_path}
|
||||||
};
|
};
|
||||||
static const struct {
|
static const struct {
|
||||||
char *label;
|
char *label;
|
||||||
|
@ -1008,6 +1021,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
edit_pattern_path = file_prefs_strdup (pattern_path);
|
edit_pattern_path = file_prefs_strdup (pattern_path);
|
||||||
edit_palette_path = file_prefs_strdup (palette_path);
|
edit_palette_path = file_prefs_strdup (palette_path);
|
||||||
edit_plug_in_path = file_prefs_strdup (plug_in_path);
|
edit_plug_in_path = file_prefs_strdup (plug_in_path);
|
||||||
|
edit_module_path = file_prefs_strdup (module_path);
|
||||||
edit_gradient_path = file_prefs_strdup (gradient_path);
|
edit_gradient_path = file_prefs_strdup (gradient_path);
|
||||||
edit_stingy_memory_use = stingy_memory_use;
|
edit_stingy_memory_use = stingy_memory_use;
|
||||||
edit_tile_cache_size = tile_cache_size;
|
edit_tile_cache_size = tile_cache_size;
|
||||||
|
@ -1056,6 +1070,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
file_prefs_strset (&old_pattern_path, edit_pattern_path);
|
file_prefs_strset (&old_pattern_path, edit_pattern_path);
|
||||||
file_prefs_strset (&old_palette_path, edit_palette_path);
|
file_prefs_strset (&old_palette_path, edit_palette_path);
|
||||||
file_prefs_strset (&old_plug_in_path, edit_plug_in_path);
|
file_prefs_strset (&old_plug_in_path, edit_plug_in_path);
|
||||||
|
file_prefs_strset (&old_module_path, edit_module_path);
|
||||||
file_prefs_strset (&old_gradient_path, edit_gradient_path);
|
file_prefs_strset (&old_gradient_path, edit_gradient_path);
|
||||||
|
|
||||||
for (i = 0; i < nmem_size_units; i++)
|
for (i = 0; i < nmem_size_units; i++)
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
# Set the plug-in search path...this path will be searched for
|
# Set the plug-in search path...this path will be searched for
|
||||||
# plug-ins when the plug-in is run.
|
# plug-ins when the plug-in is run.
|
||||||
(plug-in-path "${gimp_dir}/plug-ins:${gimp_dir}/plug-ins/script-fu:${gimp_plugin_dir}/plug-ins:${gimp_data_dir}/plug-ins")
|
(plug-in-path "${gimp_dir}/plug-ins:${gimp_plugin_dir}/plug-ins")
|
||||||
|
|
||||||
# Set the path for the script-fu plug-in. This value is ignored by
|
# Set the path for the script-fu plug-in. This value is ignored by
|
||||||
# the GIMP if the script-fu plug-in is never run.
|
# the GIMP if the script-fu plug-in is never run.
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
# Set the plug-in search path...this path will be searched for
|
# Set the plug-in search path...this path will be searched for
|
||||||
# plug-ins when the plug-in is run.
|
# plug-ins when the plug-in is run.
|
||||||
(plug-in-path "${gimp_dir}/plug-ins:${gimp_dir}/plug-ins/script-fu:${gimp_plugin_dir}/plug-ins:${gimp_data_dir}/plug-ins")
|
(plug-in-path "${gimp_dir}/plug-ins:${gimp_plugin_dir}/plug-ins")
|
||||||
|
|
||||||
# Set the path for the script-fu plug-in. This value is ignored by
|
# Set the path for the script-fu plug-in. This value is ignored by
|
||||||
# the GIMP if the script-fu plug-in is never run.
|
# the GIMP if the script-fu plug-in is never run.
|
||||||
|
|
|
@ -39,9 +39,9 @@ static void gimp_path_editor_select_callback (GtkWidget *widget, gpointer data)
|
||||||
static void gimp_path_editor_deselect_callback (GtkWidget *widget,
|
static void gimp_path_editor_deselect_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_path_editor_new_callback (GtkWidget *widget, gpointer data);
|
static void gimp_path_editor_new_callback (GtkWidget *widget, gpointer data);
|
||||||
static void gimp_path_editor_delete_callback (GtkWidget *widget, gpointer data);
|
|
||||||
static void gimp_path_editor_move_callback (GtkWidget *widget, gpointer data);
|
static void gimp_path_editor_move_callback (GtkWidget *widget, gpointer data);
|
||||||
static void gimp_path_editor_filesel_callback (GtkWidget *widget, gpointer data);
|
static void gimp_path_editor_filesel_callback (GtkWidget *widget, gpointer data);
|
||||||
|
static void gimp_path_editor_delete_callback (GtkWidget *widget, gpointer data);
|
||||||
|
|
||||||
static void gimp_path_editor_data_destroy_callback (gpointer *data);
|
static void gimp_path_editor_data_destroy_callback (gpointer *data);
|
||||||
|
|
||||||
|
@ -106,12 +106,6 @@ gimp_path_editor_init (GimpPathEditor *gpe)
|
||||||
gtk_signal_connect (GTK_OBJECT(gpe->new_button), "clicked",
|
gtk_signal_connect (GTK_OBJECT(gpe->new_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gimp_path_editor_new_callback), gpe);
|
GTK_SIGNAL_FUNC(gimp_path_editor_new_callback), gpe);
|
||||||
|
|
||||||
gpe->delete_button = gtk_button_new ();
|
|
||||||
gtk_widget_set_sensitive (gpe->delete_button, FALSE);
|
|
||||||
gtk_box_pack_start (GTK_BOX (button_box), gpe->delete_button, TRUE, TRUE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT(gpe->delete_button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC(gimp_path_editor_delete_callback), gpe);
|
|
||||||
|
|
||||||
gpe->up_button = gtk_button_new ();
|
gpe->up_button = gtk_button_new ();
|
||||||
gtk_widget_set_sensitive (gpe->up_button, FALSE);
|
gtk_widget_set_sensitive (gpe->up_button, FALSE);
|
||||||
gtk_box_pack_start (GTK_BOX (button_box), gpe->up_button, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (button_box), gpe->up_button, TRUE, TRUE, 0);
|
||||||
|
@ -124,6 +118,12 @@ gimp_path_editor_init (GimpPathEditor *gpe)
|
||||||
gtk_signal_connect (GTK_OBJECT(gpe->down_button), "clicked",
|
gtk_signal_connect (GTK_OBJECT(gpe->down_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gimp_path_editor_move_callback), gpe);
|
GTK_SIGNAL_FUNC(gimp_path_editor_move_callback), gpe);
|
||||||
|
|
||||||
|
gpe->delete_button = gtk_button_new ();
|
||||||
|
gtk_widget_set_sensitive (gpe->delete_button, FALSE);
|
||||||
|
gtk_box_pack_start (GTK_BOX (button_box), gpe->delete_button, TRUE, TRUE, 0);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(gpe->delete_button), "clicked",
|
||||||
|
GTK_SIGNAL_FUNC(gimp_path_editor_delete_callback), gpe);
|
||||||
|
|
||||||
hadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
hadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
||||||
vadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
vadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
||||||
scrolled_window =
|
scrolled_window =
|
||||||
|
@ -266,15 +266,6 @@ gimp_path_editor_realize (GtkWidget *widget,
|
||||||
gtk_widget_show (gtk_pixmap);
|
gtk_widget_show (gtk_pixmap);
|
||||||
gtk_widget_show (gpe->new_button);
|
gtk_widget_show (gpe->new_button);
|
||||||
|
|
||||||
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
|
||||||
&mask,
|
|
||||||
&style->bg[GTK_STATE_NORMAL],
|
|
||||||
delete_xpm);
|
|
||||||
gtk_pixmap = gtk_pixmap_new (pixmap, mask);
|
|
||||||
gtk_container_add (GTK_CONTAINER (gpe->delete_button), gtk_pixmap);
|
|
||||||
gtk_widget_show (gtk_pixmap);
|
|
||||||
gtk_widget_show (gpe->delete_button);
|
|
||||||
|
|
||||||
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
||||||
&mask,
|
&mask,
|
||||||
&style->bg[GTK_STATE_NORMAL],
|
&style->bg[GTK_STATE_NORMAL],
|
||||||
|
@ -293,6 +284,15 @@ gimp_path_editor_realize (GtkWidget *widget,
|
||||||
gtk_widget_show (gtk_pixmap);
|
gtk_widget_show (gtk_pixmap);
|
||||||
gtk_widget_show (gpe->down_button);
|
gtk_widget_show (gpe->down_button);
|
||||||
|
|
||||||
|
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
||||||
|
&mask,
|
||||||
|
&style->bg[GTK_STATE_NORMAL],
|
||||||
|
delete_xpm);
|
||||||
|
gtk_pixmap = gtk_pixmap_new (pixmap, mask);
|
||||||
|
gtk_container_add (GTK_CONTAINER (gpe->delete_button), gtk_pixmap);
|
||||||
|
gtk_widget_show (gtk_pixmap);
|
||||||
|
gtk_widget_show (gpe->delete_button);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
for (list = GTK_LIST (gpe->dir_list)->children; list; list = list->next)
|
for (list = GTK_LIST (gpe->dir_list)->children; list; list = list->next)
|
||||||
{
|
{
|
||||||
|
@ -412,6 +412,33 @@ gimp_path_editor_new_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_path_editor_move_callback (GtkWidget *widget,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GimpPathEditor *gpe = GIMP_PATH_EDITOR (data);
|
||||||
|
GList *move_list = NULL;
|
||||||
|
gint pos;
|
||||||
|
gint distance;
|
||||||
|
|
||||||
|
if (gpe->selected_item == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pos = gtk_list_child_position (GTK_LIST (gpe->dir_list), gpe->selected_item);
|
||||||
|
distance = (widget == gpe->up_button) ? - 1 : 1;
|
||||||
|
move_list = g_list_append (move_list, gpe->selected_item);
|
||||||
|
|
||||||
|
gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
||||||
|
gtk_list_remove_items_no_unref (GTK_LIST (gpe->dir_list), move_list);
|
||||||
|
gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
||||||
|
gtk_list_insert_items (GTK_LIST (gpe->dir_list), move_list, pos + distance);
|
||||||
|
gtk_list_select_item (GTK_LIST (gpe->dir_list), pos + distance);
|
||||||
|
|
||||||
|
gtk_signal_emit (GTK_OBJECT (gpe),
|
||||||
|
gimp_path_editor_signals[GPE_PATH_CHANGED_SIGNAL]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_path_editor_delete_callback (GtkWidget *widget,
|
gimp_path_editor_delete_callback (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
@ -450,33 +477,6 @@ gimp_path_editor_delete_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_path_editor_move_callback (GtkWidget *widget,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
GimpPathEditor *gpe = GIMP_PATH_EDITOR (data);
|
|
||||||
GList *move_list = NULL;
|
|
||||||
gint pos;
|
|
||||||
gint distance;
|
|
||||||
|
|
||||||
if (gpe->selected_item == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
pos = gtk_list_child_position (GTK_LIST (gpe->dir_list), gpe->selected_item);
|
|
||||||
distance = (widget == gpe->up_button) ? - 1 : 1;
|
|
||||||
move_list = g_list_append (move_list, gpe->selected_item);
|
|
||||||
|
|
||||||
gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
|
||||||
gtk_list_remove_items_no_unref (GTK_LIST (gpe->dir_list), move_list);
|
|
||||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
|
||||||
gtk_list_insert_items (GTK_LIST (gpe->dir_list), move_list, pos + distance);
|
|
||||||
gtk_list_select_item (GTK_LIST (gpe->dir_list), pos + distance);
|
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (gpe),
|
|
||||||
gimp_path_editor_signals[GPE_PATH_CHANGED_SIGNAL]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_path_editor_filesel_callback (GtkWidget *widget,
|
gimp_path_editor_filesel_callback (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
|
|
@ -45,9 +45,9 @@ struct _GimpPathEditor
|
||||||
GtkWidget *upper_hbox;
|
GtkWidget *upper_hbox;
|
||||||
|
|
||||||
GtkWidget *new_button;
|
GtkWidget *new_button;
|
||||||
GtkWidget *delete_button;
|
|
||||||
GtkWidget *up_button;
|
GtkWidget *up_button;
|
||||||
GtkWidget *down_button;
|
GtkWidget *down_button;
|
||||||
|
GtkWidget *delete_button;
|
||||||
|
|
||||||
GtkWidget *file_selection;
|
GtkWidget *file_selection;
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,17 @@ static void gimp_size_entry_unit_callback (GtkWidget *widget,
|
||||||
|
|
||||||
static void gimp_size_entry_value_callback (GtkWidget *widget,
|
static void gimp_size_entry_value_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
static int gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
static void gimp_size_entry_refval_callback (GtkWidget *widget,
|
static void gimp_size_entry_refval_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
static int gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
||||||
|
GdkEvent *event,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
static int gimp_size_entry_focus_in_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
|
@ -238,6 +242,10 @@ gimp_size_entry_new (gint number_of_fields,
|
||||||
gse->show_refval+1, gse->show_refval+2);
|
gse->show_refval+1, gse->show_refval+2);
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton), "changed",
|
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton), "changed",
|
||||||
(GtkSignalFunc) gimp_size_entry_value_callback, gsef);
|
(GtkSignalFunc) gimp_size_entry_value_callback, gsef);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton),
|
||||||
|
"focus_in_event",
|
||||||
|
(GdkEventFunc) gimp_size_entry_focus_in_callback,
|
||||||
|
gsef);
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton),
|
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton),
|
||||||
"focus_out_event",
|
"focus_out_event",
|
||||||
(GdkEventFunc) gimp_size_entry_value_focus_out_callback,
|
(GdkEventFunc) gimp_size_entry_value_focus_out_callback,
|
||||||
|
@ -262,6 +270,10 @@ gimp_size_entry_new (gint number_of_fields,
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton), "changed",
|
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton), "changed",
|
||||||
(GtkSignalFunc) gimp_size_entry_refval_callback,
|
(GtkSignalFunc) gimp_size_entry_refval_callback,
|
||||||
gsef);
|
gsef);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton),
|
||||||
|
"focus_in_event",
|
||||||
|
(GdkEventFunc) gimp_size_entry_focus_in_callback,
|
||||||
|
gsef);
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton),
|
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton),
|
||||||
"focus_out_event",
|
"focus_out_event",
|
||||||
(GdkEventFunc) gimp_size_entry_refval_focus_out_callback,
|
(GdkEventFunc) gimp_size_entry_refval_focus_out_callback,
|
||||||
|
@ -504,7 +516,7 @@ gimp_size_entry_value_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
@ -513,8 +525,12 @@ gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
||||||
|
|
||||||
gsef = (GimpSizeEntryField*)data;
|
gsef = (GimpSizeEntryField*)data;
|
||||||
|
|
||||||
|
gtk_editable_select_region (GTK_EDITABLE (widget), 0, 0);
|
||||||
|
|
||||||
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->value_spinbutton));
|
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->value_spinbutton));
|
||||||
gimp_size_entry_value_callback (widget, data);
|
gimp_size_entry_value_callback (widget, data);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -721,7 +737,7 @@ gimp_size_entry_refval_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
@ -730,8 +746,12 @@ gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
||||||
|
|
||||||
gsef = (GimpSizeEntryField*)data;
|
gsef = (GimpSizeEntryField*)data;
|
||||||
|
|
||||||
|
gtk_editable_select_region (GTK_EDITABLE (widget), 0, 0);
|
||||||
|
|
||||||
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->refval_spinbutton));
|
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->refval_spinbutton));
|
||||||
gimp_size_entry_refval_callback (widget, data);
|
gimp_size_entry_refval_callback (widget, data);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -810,3 +830,33 @@ gimp_size_entry_unit_callback (GtkWidget *widget,
|
||||||
gtk_signal_emit (GTK_OBJECT (data),
|
gtk_signal_emit (GTK_OBJECT (data),
|
||||||
gimp_size_entry_signals[GSE_UNIT_CHANGED_SIGNAL]);
|
gimp_size_entry_signals[GSE_UNIT_CHANGED_SIGNAL]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* focus stuff **********/
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_size_entry_grab_focus (GimpSizeEntry *gse)
|
||||||
|
{
|
||||||
|
GimpSizeEntryField *gsef;
|
||||||
|
|
||||||
|
g_return_if_fail (gse != NULL);
|
||||||
|
g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse));
|
||||||
|
|
||||||
|
gsef = (GimpSizeEntryField*) gse->fields->data;
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (gse->show_refval ?
|
||||||
|
gsef->refval_spinbutton : gsef->value_spinbutton);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* this one highlights the spinbutton's contents
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
gimp_size_entry_focus_in_callback (GtkWidget *widget,
|
||||||
|
GdkEvent *event,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
|
@ -170,6 +170,10 @@ GUnit gimp_size_entry_get_unit (GimpSizeEntry *gse);
|
||||||
void gimp_size_entry_set_unit (GimpSizeEntry *gse,
|
void gimp_size_entry_set_unit (GimpSizeEntry *gse,
|
||||||
GUnit unit);
|
GUnit unit);
|
||||||
|
|
||||||
|
/* this makes the first spinbutton grab the focus
|
||||||
|
*/
|
||||||
|
void gimp_size_entry_grab_focus (GimpSizeEntry *gse);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
|
@ -39,9 +39,9 @@ static void gimp_path_editor_select_callback (GtkWidget *widget, gpointer data)
|
||||||
static void gimp_path_editor_deselect_callback (GtkWidget *widget,
|
static void gimp_path_editor_deselect_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_path_editor_new_callback (GtkWidget *widget, gpointer data);
|
static void gimp_path_editor_new_callback (GtkWidget *widget, gpointer data);
|
||||||
static void gimp_path_editor_delete_callback (GtkWidget *widget, gpointer data);
|
|
||||||
static void gimp_path_editor_move_callback (GtkWidget *widget, gpointer data);
|
static void gimp_path_editor_move_callback (GtkWidget *widget, gpointer data);
|
||||||
static void gimp_path_editor_filesel_callback (GtkWidget *widget, gpointer data);
|
static void gimp_path_editor_filesel_callback (GtkWidget *widget, gpointer data);
|
||||||
|
static void gimp_path_editor_delete_callback (GtkWidget *widget, gpointer data);
|
||||||
|
|
||||||
static void gimp_path_editor_data_destroy_callback (gpointer *data);
|
static void gimp_path_editor_data_destroy_callback (gpointer *data);
|
||||||
|
|
||||||
|
@ -106,12 +106,6 @@ gimp_path_editor_init (GimpPathEditor *gpe)
|
||||||
gtk_signal_connect (GTK_OBJECT(gpe->new_button), "clicked",
|
gtk_signal_connect (GTK_OBJECT(gpe->new_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gimp_path_editor_new_callback), gpe);
|
GTK_SIGNAL_FUNC(gimp_path_editor_new_callback), gpe);
|
||||||
|
|
||||||
gpe->delete_button = gtk_button_new ();
|
|
||||||
gtk_widget_set_sensitive (gpe->delete_button, FALSE);
|
|
||||||
gtk_box_pack_start (GTK_BOX (button_box), gpe->delete_button, TRUE, TRUE, 0);
|
|
||||||
gtk_signal_connect (GTK_OBJECT(gpe->delete_button), "clicked",
|
|
||||||
GTK_SIGNAL_FUNC(gimp_path_editor_delete_callback), gpe);
|
|
||||||
|
|
||||||
gpe->up_button = gtk_button_new ();
|
gpe->up_button = gtk_button_new ();
|
||||||
gtk_widget_set_sensitive (gpe->up_button, FALSE);
|
gtk_widget_set_sensitive (gpe->up_button, FALSE);
|
||||||
gtk_box_pack_start (GTK_BOX (button_box), gpe->up_button, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (button_box), gpe->up_button, TRUE, TRUE, 0);
|
||||||
|
@ -124,6 +118,12 @@ gimp_path_editor_init (GimpPathEditor *gpe)
|
||||||
gtk_signal_connect (GTK_OBJECT(gpe->down_button), "clicked",
|
gtk_signal_connect (GTK_OBJECT(gpe->down_button), "clicked",
|
||||||
GTK_SIGNAL_FUNC(gimp_path_editor_move_callback), gpe);
|
GTK_SIGNAL_FUNC(gimp_path_editor_move_callback), gpe);
|
||||||
|
|
||||||
|
gpe->delete_button = gtk_button_new ();
|
||||||
|
gtk_widget_set_sensitive (gpe->delete_button, FALSE);
|
||||||
|
gtk_box_pack_start (GTK_BOX (button_box), gpe->delete_button, TRUE, TRUE, 0);
|
||||||
|
gtk_signal_connect (GTK_OBJECT(gpe->delete_button), "clicked",
|
||||||
|
GTK_SIGNAL_FUNC(gimp_path_editor_delete_callback), gpe);
|
||||||
|
|
||||||
hadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
hadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
||||||
vadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
vadjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.1, 0.2, 1.0);
|
||||||
scrolled_window =
|
scrolled_window =
|
||||||
|
@ -266,15 +266,6 @@ gimp_path_editor_realize (GtkWidget *widget,
|
||||||
gtk_widget_show (gtk_pixmap);
|
gtk_widget_show (gtk_pixmap);
|
||||||
gtk_widget_show (gpe->new_button);
|
gtk_widget_show (gpe->new_button);
|
||||||
|
|
||||||
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
|
||||||
&mask,
|
|
||||||
&style->bg[GTK_STATE_NORMAL],
|
|
||||||
delete_xpm);
|
|
||||||
gtk_pixmap = gtk_pixmap_new (pixmap, mask);
|
|
||||||
gtk_container_add (GTK_CONTAINER (gpe->delete_button), gtk_pixmap);
|
|
||||||
gtk_widget_show (gtk_pixmap);
|
|
||||||
gtk_widget_show (gpe->delete_button);
|
|
||||||
|
|
||||||
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
||||||
&mask,
|
&mask,
|
||||||
&style->bg[GTK_STATE_NORMAL],
|
&style->bg[GTK_STATE_NORMAL],
|
||||||
|
@ -293,6 +284,15 @@ gimp_path_editor_realize (GtkWidget *widget,
|
||||||
gtk_widget_show (gtk_pixmap);
|
gtk_widget_show (gtk_pixmap);
|
||||||
gtk_widget_show (gpe->down_button);
|
gtk_widget_show (gpe->down_button);
|
||||||
|
|
||||||
|
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
|
||||||
|
&mask,
|
||||||
|
&style->bg[GTK_STATE_NORMAL],
|
||||||
|
delete_xpm);
|
||||||
|
gtk_pixmap = gtk_pixmap_new (pixmap, mask);
|
||||||
|
gtk_container_add (GTK_CONTAINER (gpe->delete_button), gtk_pixmap);
|
||||||
|
gtk_widget_show (gtk_pixmap);
|
||||||
|
gtk_widget_show (gpe->delete_button);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
for (list = GTK_LIST (gpe->dir_list)->children; list; list = list->next)
|
for (list = GTK_LIST (gpe->dir_list)->children; list; list = list->next)
|
||||||
{
|
{
|
||||||
|
@ -412,6 +412,33 @@ gimp_path_editor_new_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_path_editor_move_callback (GtkWidget *widget,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GimpPathEditor *gpe = GIMP_PATH_EDITOR (data);
|
||||||
|
GList *move_list = NULL;
|
||||||
|
gint pos;
|
||||||
|
gint distance;
|
||||||
|
|
||||||
|
if (gpe->selected_item == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pos = gtk_list_child_position (GTK_LIST (gpe->dir_list), gpe->selected_item);
|
||||||
|
distance = (widget == gpe->up_button) ? - 1 : 1;
|
||||||
|
move_list = g_list_append (move_list, gpe->selected_item);
|
||||||
|
|
||||||
|
gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
||||||
|
gtk_list_remove_items_no_unref (GTK_LIST (gpe->dir_list), move_list);
|
||||||
|
gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
||||||
|
gtk_list_insert_items (GTK_LIST (gpe->dir_list), move_list, pos + distance);
|
||||||
|
gtk_list_select_item (GTK_LIST (gpe->dir_list), pos + distance);
|
||||||
|
|
||||||
|
gtk_signal_emit (GTK_OBJECT (gpe),
|
||||||
|
gimp_path_editor_signals[GPE_PATH_CHANGED_SIGNAL]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_path_editor_delete_callback (GtkWidget *widget,
|
gimp_path_editor_delete_callback (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
@ -450,33 +477,6 @@ gimp_path_editor_delete_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_path_editor_move_callback (GtkWidget *widget,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
GimpPathEditor *gpe = GIMP_PATH_EDITOR (data);
|
|
||||||
GList *move_list = NULL;
|
|
||||||
gint pos;
|
|
||||||
gint distance;
|
|
||||||
|
|
||||||
if (gpe->selected_item == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
pos = gtk_list_child_position (GTK_LIST (gpe->dir_list), gpe->selected_item);
|
|
||||||
distance = (widget == gpe->up_button) ? - 1 : 1;
|
|
||||||
move_list = g_list_append (move_list, gpe->selected_item);
|
|
||||||
|
|
||||||
gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
|
||||||
gtk_list_remove_items_no_unref (GTK_LIST (gpe->dir_list), move_list);
|
|
||||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->selected_item), gpe);
|
|
||||||
gtk_list_insert_items (GTK_LIST (gpe->dir_list), move_list, pos + distance);
|
|
||||||
gtk_list_select_item (GTK_LIST (gpe->dir_list), pos + distance);
|
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (gpe),
|
|
||||||
gimp_path_editor_signals[GPE_PATH_CHANGED_SIGNAL]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_path_editor_filesel_callback (GtkWidget *widget,
|
gimp_path_editor_filesel_callback (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
|
|
@ -45,9 +45,9 @@ struct _GimpPathEditor
|
||||||
GtkWidget *upper_hbox;
|
GtkWidget *upper_hbox;
|
||||||
|
|
||||||
GtkWidget *new_button;
|
GtkWidget *new_button;
|
||||||
GtkWidget *delete_button;
|
|
||||||
GtkWidget *up_button;
|
GtkWidget *up_button;
|
||||||
GtkWidget *down_button;
|
GtkWidget *down_button;
|
||||||
|
GtkWidget *delete_button;
|
||||||
|
|
||||||
GtkWidget *file_selection;
|
GtkWidget *file_selection;
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,17 @@ static void gimp_size_entry_unit_callback (GtkWidget *widget,
|
||||||
|
|
||||||
static void gimp_size_entry_value_callback (GtkWidget *widget,
|
static void gimp_size_entry_value_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
static int gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
static void gimp_size_entry_refval_callback (GtkWidget *widget,
|
static void gimp_size_entry_refval_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
static int gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
||||||
|
GdkEvent *event,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
static int gimp_size_entry_focus_in_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
|
@ -238,6 +242,10 @@ gimp_size_entry_new (gint number_of_fields,
|
||||||
gse->show_refval+1, gse->show_refval+2);
|
gse->show_refval+1, gse->show_refval+2);
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton), "changed",
|
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton), "changed",
|
||||||
(GtkSignalFunc) gimp_size_entry_value_callback, gsef);
|
(GtkSignalFunc) gimp_size_entry_value_callback, gsef);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton),
|
||||||
|
"focus_in_event",
|
||||||
|
(GdkEventFunc) gimp_size_entry_focus_in_callback,
|
||||||
|
gsef);
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton),
|
gtk_signal_connect (GTK_OBJECT (gsef->value_spinbutton),
|
||||||
"focus_out_event",
|
"focus_out_event",
|
||||||
(GdkEventFunc) gimp_size_entry_value_focus_out_callback,
|
(GdkEventFunc) gimp_size_entry_value_focus_out_callback,
|
||||||
|
@ -262,6 +270,10 @@ gimp_size_entry_new (gint number_of_fields,
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton), "changed",
|
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton), "changed",
|
||||||
(GtkSignalFunc) gimp_size_entry_refval_callback,
|
(GtkSignalFunc) gimp_size_entry_refval_callback,
|
||||||
gsef);
|
gsef);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton),
|
||||||
|
"focus_in_event",
|
||||||
|
(GdkEventFunc) gimp_size_entry_focus_in_callback,
|
||||||
|
gsef);
|
||||||
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton),
|
gtk_signal_connect (GTK_OBJECT (gsef->refval_spinbutton),
|
||||||
"focus_out_event",
|
"focus_out_event",
|
||||||
(GdkEventFunc) gimp_size_entry_refval_focus_out_callback,
|
(GdkEventFunc) gimp_size_entry_refval_focus_out_callback,
|
||||||
|
@ -504,7 +516,7 @@ gimp_size_entry_value_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
@ -513,8 +525,12 @@ gimp_size_entry_value_focus_out_callback (GtkWidget *widget,
|
||||||
|
|
||||||
gsef = (GimpSizeEntryField*)data;
|
gsef = (GimpSizeEntryField*)data;
|
||||||
|
|
||||||
|
gtk_editable_select_region (GTK_EDITABLE (widget), 0, 0);
|
||||||
|
|
||||||
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->value_spinbutton));
|
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->value_spinbutton));
|
||||||
gimp_size_entry_value_callback (widget, data);
|
gimp_size_entry_value_callback (widget, data);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -721,7 +737,7 @@ gimp_size_entry_refval_callback (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
@ -730,8 +746,12 @@ gimp_size_entry_refval_focus_out_callback (GtkWidget *widget,
|
||||||
|
|
||||||
gsef = (GimpSizeEntryField*)data;
|
gsef = (GimpSizeEntryField*)data;
|
||||||
|
|
||||||
|
gtk_editable_select_region (GTK_EDITABLE (widget), 0, 0);
|
||||||
|
|
||||||
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->refval_spinbutton));
|
gtk_spin_button_update (GTK_SPIN_BUTTON (gsef->refval_spinbutton));
|
||||||
gimp_size_entry_refval_callback (widget, data);
|
gimp_size_entry_refval_callback (widget, data);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -810,3 +830,33 @@ gimp_size_entry_unit_callback (GtkWidget *widget,
|
||||||
gtk_signal_emit (GTK_OBJECT (data),
|
gtk_signal_emit (GTK_OBJECT (data),
|
||||||
gimp_size_entry_signals[GSE_UNIT_CHANGED_SIGNAL]);
|
gimp_size_entry_signals[GSE_UNIT_CHANGED_SIGNAL]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* focus stuff **********/
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_size_entry_grab_focus (GimpSizeEntry *gse)
|
||||||
|
{
|
||||||
|
GimpSizeEntryField *gsef;
|
||||||
|
|
||||||
|
g_return_if_fail (gse != NULL);
|
||||||
|
g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse));
|
||||||
|
|
||||||
|
gsef = (GimpSizeEntryField*) gse->fields->data;
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (gse->show_refval ?
|
||||||
|
gsef->refval_spinbutton : gsef->value_spinbutton);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* this one highlights the spinbutton's contents
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
gimp_size_entry_focus_in_callback (GtkWidget *widget,
|
||||||
|
GdkEvent *event,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
|
@ -170,6 +170,10 @@ GUnit gimp_size_entry_get_unit (GimpSizeEntry *gse);
|
||||||
void gimp_size_entry_set_unit (GimpSizeEntry *gse,
|
void gimp_size_entry_set_unit (GimpSizeEntry *gse,
|
||||||
GUnit unit);
|
GUnit unit);
|
||||||
|
|
||||||
|
/* this makes the first spinbutton grab the focus
|
||||||
|
*/
|
||||||
|
void gimp_size_entry_grab_focus (GimpSizeEntry *gse);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
Loading…
Reference in New Issue