Commit bca167a5 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

code cleanup, no logic changed.

2006-05-10  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimptoolbox.c: code cleanup, no logic changed.

	* app/widgets/gimptoolbox-color-area.c: make the very first click
	on the color area work as expected.
parent 905e61a2
2006-05-10 Michael Natterer <mitch@gimp.org>
* app/widgets/gimptoolbox.c: code cleanup, no logic changed.
* app/widgets/gimptoolbox-color-area.c: make the very first click
on the color area work as expected.
2006-05-10 Sven Neumann <sven@gimp.org>
* app/composite/gimp-composite-mmx.c
......
......@@ -148,24 +148,21 @@ color_area_color_clicked (GimpFgBgEditor *editor,
toplevel_factory = gimp_dialog_factory_from_name ("toplevel");
color_dialog = gimp_color_dialog_new (NULL, title, NULL, NULL,
color_dialog = gimp_color_dialog_new (NULL, NULL, NULL, NULL,
GTK_WIDGET (editor),
toplevel_factory,
"gimp-toolbox-color-dialog",
(const GimpRGB *) &color,
&color,
TRUE, FALSE);
color_dialog_active = TRUE;
g_signal_connect (color_dialog, "update",
G_CALLBACK (color_area_dialog_update),
context);
}
else
{
gtk_window_set_title (GTK_WINDOW (color_dialog), title);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (color_dialog), &color);
gtk_window_present (GTK_WINDOW (color_dialog));
color_dialog_active = TRUE;
}
gtk_window_set_title (GTK_WINDOW (color_dialog), title);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (color_dialog), &color);
gtk_window_present (GTK_WINDOW (color_dialog));
color_dialog_active = TRUE;
}
......@@ -145,19 +145,19 @@ gimp_toolbox_class_init (GimpToolboxClass *klass)
image_dock_class->ui_manager_name = "<Toolbox>";
gtk_widget_class_install_style_property
(widget_class, g_param_spec_enum ("tool-icon-size",
NULL, NULL,
GTK_TYPE_ICON_SIZE,
DEFAULT_TOOL_ICON_SIZE,
GIMP_PARAM_READABLE));
gtk_widget_class_install_style_property
(widget_class, g_param_spec_enum ("button-relief",
NULL, NULL,
GTK_TYPE_RELIEF_STYLE,
DEFAULT_BUTTON_RELIEF,
GIMP_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_enum ("tool-icon-size",
NULL, NULL,
GTK_TYPE_ICON_SIZE,
DEFAULT_TOOL_ICON_SIZE,
GIMP_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_enum ("button-relief",
NULL, NULL,
GTK_TYPE_RELIEF_STYLE,
DEFAULT_BUTTON_RELIEF,
GIMP_PARAM_READABLE));
}
static void
......@@ -237,10 +237,8 @@ gimp_toolbox_constructor (GType type,
*/
display = gtk_widget_get_display (GTK_WIDGET (toolbox));
for (list = gdk_display_list_devices (display); list; list = list->next)
{
if (! ((GdkDevice *) (list->data))->has_cursor)
break;
}
if (! ((GdkDevice *) (list->data))->has_cursor)
break;
if (! list) /* all devices have cursor */
{
......@@ -306,6 +304,9 @@ gimp_toolbox_delete_event (GtkWidget *widget,
{
GtkAction *action;
/* activate the action instead of simply calling gimp_exit(), so the
* quit action's senistivity is taken into account
*/
action = gimp_ui_manager_find_action (GIMP_IMAGE_DOCK (widget)->ui_manager,
"file", "file-quit");
if (action)
......@@ -605,13 +606,11 @@ toolbox_create_tools (GimpToolbox *toolbox,
list;
list = g_list_next (list))
{
GimpToolInfo *tool_info;
GimpToolInfo *tool_info = list->data;
GtkWidget *button;
GtkWidget *image;
const gchar *stock_id;
tool_info = (GimpToolInfo *) list->data;
button = gtk_radio_button_new (group);
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
......
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