The lc-dialog can now be opened from the toolbox-menu. Did that in

preparation for auto-opening dialogs on start-up.


--Sven
This commit is contained in:
Sven Neumann 1998-06-23 21:28:22 +00:00
parent e6a03c8573
commit efd46c7a67
11 changed files with 48 additions and 4 deletions

View File

@ -1,3 +1,11 @@
Tue Jun 23 23:21:16 MEST 1998 Sven Neumann <sven@gimp.org>
* app/commands.c
* app/layers_dialog.c
* app/menus.c: The lc-dialog can now be opened from the
toolbox-menu. Did that in preparation for auto-opening dialogs on
start-up.
Mon Jun 22 22:57:00 EDT 1998 Manish Vachharajani <mvachhar@vger.rutgers.edu>
* app/eraser.c: Ack, try to get pressure sensitivity right this time.

View File

@ -982,7 +982,10 @@ dialogs_lc_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
lc_dialog_create (gdisp->gimage->ID);
if (gdisp == NULL)
lc_dialog_create (-1);
else
lc_dialog_create (gdisp->gimage->ID);
}
void

View File

@ -982,7 +982,10 @@ dialogs_lc_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
lc_dialog_create (gdisp->gimage->ID);
if (gdisp == NULL)
lc_dialog_create (-1);
else
lc_dialog_create (gdisp->gimage->ID);
}
void

View File

@ -982,7 +982,10 @@ dialogs_lc_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
lc_dialog_create (gdisp->gimage->ID);
if (gdisp == NULL)
lc_dialog_create (-1);
else
lc_dialog_create (gdisp->gimage->ID);
}
void

View File

@ -982,7 +982,10 @@ dialogs_lc_cmd_callback (GtkWidget *widget,
gdisp = gdisplay_active ();
lc_dialog_create (gdisp->gimage->ID);
if (gdisp == NULL)
lc_dialog_create (-1);
else
lc_dialog_create (gdisp->gimage->ID);
}
void

View File

@ -378,6 +378,16 @@ lc_dialog_create (int gimage_id)
gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 1);
gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 0);
if (gimage_id == -1)
{
gtk_widget_set_sensitive (lc_subshell, FALSE);
/* This is a little bit ugly, since we should also set
the channels_ops_buttons insensitive, but they are
never shown if the dialog is created on startup with
no image present. */
ops_button_box_set_insensitive (layers_ops_buttons);
}
layers_dialog_update (gimage_id);
channels_dialog_update (gimage_id);
gdisplays_flush ();

View File

@ -45,6 +45,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },

View File

@ -378,6 +378,16 @@ lc_dialog_create (int gimage_id)
gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 1);
gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 0);
if (gimage_id == -1)
{
gtk_widget_set_sensitive (lc_subshell, FALSE);
/* This is a little bit ugly, since we should also set
the channels_ops_buttons insensitive, but they are
never shown if the dialog is created on startup with
no image present. */
ops_button_box_set_insensitive (layers_ops_buttons);
}
layers_dialog_update (gimage_id);
channels_dialog_update (gimage_id);
gdisplays_flush ();

View File

@ -45,6 +45,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },

View File

@ -45,6 +45,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },

View File

@ -45,6 +45,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
{ "/File/Dialogs/Patterns...", "<control><shift>P", dialogs_patterns_cmd_callback, 0 },
{ "/File/Dialogs/Palette...", "<control>P", dialogs_palette_cmd_callback, 0 },
{ "/File/Dialogs/Gradient Editor...", "<control>G", dialogs_gradient_editor_cmd_callback, 0 },
{ "/File/Dialogs/Layers & Channels...", "<control>L", dialogs_lc_cmd_callback, 0 },
{ "/File/Dialogs/Tool Options...", "<control><shift>T", dialogs_tools_options_cmd_callback, 0 },
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },