mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 08:34:32 +00:00
register a log handler for the "Gimp-Vectors" domain.
2003-11-19 Sven Neumann <sven@gimp.org> * app/app_procs.c (app_run): register a log handler for the "Gimp-Vectors" domain. * app/gui/stroke-dialog.c (stroke_dialog_new): attach the saved options to its parent, the user context, not to the gimp.
This commit is contained in:
parent
8cc8bff344
commit
41553a8bb7
|
@ -1,3 +1,11 @@
|
|||
2003-11-19 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/app_procs.c (app_run): register a log handler for the
|
||||
"Gimp-Vectors" domain.
|
||||
|
||||
* app/gui/stroke-dialog.c (stroke_dialog_new): attach the saved
|
||||
options to its parent, the user context, not to the gimp.
|
||||
|
||||
2003-11-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpmodule/gimpmodule.c (gimp_module_open): don't do lazy
|
||||
|
|
|
@ -119,65 +119,53 @@ app_run (const gchar *full_prog_name,
|
|||
|
||||
g_log_set_handler ("Gimp",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Base",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Paint-Funcs",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Config",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Core",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-PDB",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Plug-In",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-File",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-XCF",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Widgets",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Display",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Tools",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Text",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-Vectors",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func, &the_gimp);
|
||||
g_log_set_handler ("Gimp-GUI",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
&the_gimp);
|
||||
gimp_message_log_func, &the_gimp);
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL,
|
||||
gimp_error_log_func,
|
||||
&the_gimp);
|
||||
gimp_error_log_func, &the_gimp);
|
||||
|
||||
units_init (the_gimp);
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ stroke_dialog_new (GimpItem *item,
|
|||
const gchar *help_id,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpStrokeOptions *options;
|
||||
GimpStrokeOptions *saved_options;
|
||||
GimpImage *image;
|
||||
|
@ -81,19 +82,19 @@ stroke_dialog_new (GimpItem *item,
|
|||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
g_return_val_if_fail (parent == NULL || GTK_IS_WIDGET (parent), NULL);
|
||||
|
||||
image = gimp_item_get_image (item);
|
||||
image = gimp_item_get_image (item);
|
||||
context = gimp_get_user_context (image->gimp);
|
||||
|
||||
options = g_object_new (GIMP_TYPE_STROKE_OPTIONS,
|
||||
"gimp", image->gimp,
|
||||
NULL);
|
||||
|
||||
saved_options = g_object_get_data (G_OBJECT (image->gimp),
|
||||
saved_options = g_object_get_data (G_OBJECT (context),
|
||||
"saved-stroke-options");
|
||||
if (saved_options)
|
||||
gimp_config_sync (GIMP_CONFIG (saved_options), GIMP_CONFIG (options), 0);
|
||||
|
||||
gimp_context_set_parent (GIMP_CONTEXT (options),
|
||||
gimp_get_user_context (image->gimp));
|
||||
gimp_context_set_parent (GIMP_CONTEXT (options), context);
|
||||
gimp_context_define_properties (GIMP_CONTEXT (options),
|
||||
GIMP_CONTEXT_FOREGROUND_MASK |
|
||||
GIMP_CONTEXT_PATTERN_MASK,
|
||||
|
@ -181,7 +182,7 @@ stroke_dialog_new (GimpItem *item,
|
|||
GtkWidget *optionmenu;
|
||||
GtkWidget *menu;
|
||||
|
||||
tool_info = gimp_context_get_tool (gimp_get_user_context (image->gimp));
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
|
@ -227,14 +228,16 @@ stroke_dialog_response (GtkWidget *widget,
|
|||
gint response_id,
|
||||
GtkWidget *dialog)
|
||||
{
|
||||
GimpItem *item;
|
||||
GtkWidget *button;
|
||||
GimpImage *image;
|
||||
GimpContext *context;
|
||||
GimpItem *item;
|
||||
GtkWidget *button;
|
||||
GimpImage *image;
|
||||
|
||||
item = g_object_get_data (G_OBJECT (dialog), "gimp-item");
|
||||
button = g_object_get_data (G_OBJECT (dialog), "gimp-stroke-button");
|
||||
|
||||
image = gimp_item_get_image (item);
|
||||
image = gimp_item_get_image (item);
|
||||
context = gimp_get_user_context (image->gimp);
|
||||
|
||||
switch (response_id)
|
||||
{
|
||||
|
@ -247,7 +250,7 @@ stroke_dialog_response (GtkWidget *widget,
|
|||
options = g_object_get_data (G_OBJECT (dialog), "gimp-stroke-options");
|
||||
menu = g_object_get_data (G_OBJECT (dialog), "gimp-tool-menu");
|
||||
|
||||
tool_info = gimp_context_get_tool (gimp_get_user_context (image->gimp));
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
gimp_container_menu_select_item (GIMP_CONTAINER_MENU (menu),
|
||||
|
@ -277,13 +280,13 @@ stroke_dialog_response (GtkWidget *widget,
|
|||
options = g_object_get_data (G_OBJECT (dialog),
|
||||
"gimp-stroke-options");
|
||||
|
||||
saved_options = g_object_get_data (G_OBJECT (image->gimp),
|
||||
saved_options = g_object_get_data (G_OBJECT (context),
|
||||
"saved-stroke-options");
|
||||
if (saved_options)
|
||||
gimp_config_sync (GIMP_CONFIG (options),
|
||||
GIMP_CONFIG (saved_options), 0);
|
||||
else
|
||||
g_object_set_data_full (G_OBJECT (image->gimp),
|
||||
g_object_set_data_full (G_OBJECT (context),
|
||||
"saved-stroke-options",
|
||||
g_object_ref (options),
|
||||
(GDestroyNotify) g_object_unref);
|
||||
|
|
|
@ -67,6 +67,7 @@ stroke_dialog_new (GimpItem *item,
|
|||
const gchar *help_id,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpStrokeOptions *options;
|
||||
GimpStrokeOptions *saved_options;
|
||||
GimpImage *image;
|
||||
|
@ -81,19 +82,19 @@ stroke_dialog_new (GimpItem *item,
|
|||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
g_return_val_if_fail (parent == NULL || GTK_IS_WIDGET (parent), NULL);
|
||||
|
||||
image = gimp_item_get_image (item);
|
||||
image = gimp_item_get_image (item);
|
||||
context = gimp_get_user_context (image->gimp);
|
||||
|
||||
options = g_object_new (GIMP_TYPE_STROKE_OPTIONS,
|
||||
"gimp", image->gimp,
|
||||
NULL);
|
||||
|
||||
saved_options = g_object_get_data (G_OBJECT (image->gimp),
|
||||
saved_options = g_object_get_data (G_OBJECT (context),
|
||||
"saved-stroke-options");
|
||||
if (saved_options)
|
||||
gimp_config_sync (GIMP_CONFIG (saved_options), GIMP_CONFIG (options), 0);
|
||||
|
||||
gimp_context_set_parent (GIMP_CONTEXT (options),
|
||||
gimp_get_user_context (image->gimp));
|
||||
gimp_context_set_parent (GIMP_CONTEXT (options), context);
|
||||
gimp_context_define_properties (GIMP_CONTEXT (options),
|
||||
GIMP_CONTEXT_FOREGROUND_MASK |
|
||||
GIMP_CONTEXT_PATTERN_MASK,
|
||||
|
@ -181,7 +182,7 @@ stroke_dialog_new (GimpItem *item,
|
|||
GtkWidget *optionmenu;
|
||||
GtkWidget *menu;
|
||||
|
||||
tool_info = gimp_context_get_tool (gimp_get_user_context (image->gimp));
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
|
@ -227,14 +228,16 @@ stroke_dialog_response (GtkWidget *widget,
|
|||
gint response_id,
|
||||
GtkWidget *dialog)
|
||||
{
|
||||
GimpItem *item;
|
||||
GtkWidget *button;
|
||||
GimpImage *image;
|
||||
GimpContext *context;
|
||||
GimpItem *item;
|
||||
GtkWidget *button;
|
||||
GimpImage *image;
|
||||
|
||||
item = g_object_get_data (G_OBJECT (dialog), "gimp-item");
|
||||
button = g_object_get_data (G_OBJECT (dialog), "gimp-stroke-button");
|
||||
|
||||
image = gimp_item_get_image (item);
|
||||
image = gimp_item_get_image (item);
|
||||
context = gimp_get_user_context (image->gimp);
|
||||
|
||||
switch (response_id)
|
||||
{
|
||||
|
@ -247,7 +250,7 @@ stroke_dialog_response (GtkWidget *widget,
|
|||
options = g_object_get_data (G_OBJECT (dialog), "gimp-stroke-options");
|
||||
menu = g_object_get_data (G_OBJECT (dialog), "gimp-tool-menu");
|
||||
|
||||
tool_info = gimp_context_get_tool (gimp_get_user_context (image->gimp));
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
gimp_container_menu_select_item (GIMP_CONTAINER_MENU (menu),
|
||||
|
@ -277,13 +280,13 @@ stroke_dialog_response (GtkWidget *widget,
|
|||
options = g_object_get_data (G_OBJECT (dialog),
|
||||
"gimp-stroke-options");
|
||||
|
||||
saved_options = g_object_get_data (G_OBJECT (image->gimp),
|
||||
saved_options = g_object_get_data (G_OBJECT (context),
|
||||
"saved-stroke-options");
|
||||
if (saved_options)
|
||||
gimp_config_sync (GIMP_CONFIG (options),
|
||||
GIMP_CONFIG (saved_options), 0);
|
||||
else
|
||||
g_object_set_data_full (G_OBJECT (image->gimp),
|
||||
g_object_set_data_full (G_OBJECT (context),
|
||||
"saved-stroke-options",
|
||||
g_object_ref (options),
|
||||
(GDestroyNotify) g_object_unref);
|
||||
|
|
Loading…
Reference in a new issue