Merge branch 'master' into soc-2009-dynamics

Conflicts:
	.gitignore
	NEWS
	app/widgets/gimptagpopup.c
	po/ru.po
This commit is contained in:
Alexia Death 2009-07-21 20:12:35 +03:00
commit cea52220ea
230 changed files with 1702 additions and 1331 deletions

10
.gitignore vendored
View file

@ -1,5 +1,3 @@
/ChangeLog
/.anjuta/
/.anjuta_sym_db.db
@ -10,6 +8,9 @@
*.patch
/app/
*.la
*.lo
*.o
/Makefile
/Makefile.in
@ -28,9 +29,9 @@
/configure
/depcomp
/gimp-2.0.pc
/gimp-zip
/gimpthumb-2.0.pc
/gimpui-2.0.pc
/gimp-zip
/gtk-doc.make
/install-sh
/intltool-extract
@ -48,6 +49,3 @@
/stamp-h
/stamp-h.in
/stamp-h1
*.la
*.lo
*.o

6
NEWS
View file

@ -73,3 +73,9 @@ Core:
PDB:
- Add procedures to manipulate size of text box
General:
- Changed licence to (L)GPLv3+
- Use the automake 1.11 feature 'silent build rules' by default
- Lots of bug fixes and cleanup

View file

@ -24,8 +24,6 @@
#include "actions-types.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
@ -227,16 +225,12 @@ static const GimpActionFactoryEntry action_groups[] =
void
actions_init (Gimp *gimp)
{
GimpGuiConfig *gui_config;
gint i;
gint i;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (global_action_factory == NULL);
gui_config = GIMP_GUI_CONFIG (gimp->config);
global_action_factory = gimp_action_factory_new (gimp,
gui_config->menu_mnemonics);
global_action_factory = gimp_action_factory_new (gimp);
for (i = 0; i < G_N_ELEMENTS (action_groups); i++)
gimp_action_factory_group_register (global_action_factory,

View file

@ -483,7 +483,8 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_widget_show (vbox);
/* Instructions */
@ -585,7 +586,8 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_widget_show (vbox);
/* Instructions */

View file

@ -90,12 +90,12 @@ levels_lut_func (Levels *levels,
inten = (gdouble) (255.0 * inten - levels->low_input[j]);
}
/* clamp to new black and white points */
inten = CLAMP (inten, 0.0, 1.0);
if (levels->gamma[j] != 0.0)
{
if (inten >= 0.0)
inten = pow ( inten, (1.0 / levels->gamma[j]));
else
inten = -pow (-inten, (1.0 / levels->gamma[j]));
inten = pow ( inten, (1.0 / levels->gamma[j]));
}
/* determine the output intensity */

View file

@ -64,7 +64,6 @@ enum
PROP_CAN_CHANGE_ACCELS,
PROP_SAVE_ACCELS,
PROP_RESTORE_ACCELS,
PROP_MENU_MNEMONICS,
PROP_LAST_OPENED_SIZE,
PROP_MAX_NEW_IMAGE_SIZE,
PROP_TOOLBOX_COLOR_AREA,
@ -87,6 +86,7 @@ enum
/* ignored, only for backward compatibility: */
PROP_INFO_WINDOW_PER_DISPLAY,
PROP_MENU_MNEMONICS,
PROP_SHOW_TOOL_TIPS,
PROP_SHOW_TIPS
};
@ -177,11 +177,6 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
"restore-accels", RESTORE_ACCELS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MENU_MNEMONICS,
"menu-mnemonics", MENU_MNEMONICS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_LAST_OPENED_SIZE,
"last-opened-size", LAST_OPENED_SIZE_BLURB,
0, 1024, 10,
@ -286,6 +281,11 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MENU_MNEMONICS,
"menu-mnemonics", MENU_MNEMONICS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TOOL_TIPS,
"show-tool-tips", NULL,
FALSE,
@ -366,9 +366,6 @@ gimp_gui_config_set_property (GObject *object,
case PROP_RESTORE_ACCELS:
gui_config->restore_accels = g_value_get_boolean (value);
break;
case PROP_MENU_MNEMONICS:
gui_config->menu_mnemonics = g_value_get_boolean (value);
break;
case PROP_LAST_OPENED_SIZE:
gui_config->last_opened_size = g_value_get_int (value);
break;
@ -433,6 +430,7 @@ gimp_gui_config_set_property (GObject *object,
break;
case PROP_INFO_WINDOW_PER_DISPLAY:
case PROP_MENU_MNEMONICS:
case PROP_SHOW_TOOL_TIPS:
case PROP_SHOW_TIPS:
/* ignored */
@ -493,9 +491,6 @@ gimp_gui_config_get_property (GObject *object,
case PROP_RESTORE_ACCELS:
g_value_set_boolean (value, gui_config->restore_accels);
break;
case PROP_MENU_MNEMONICS:
g_value_set_boolean (value, gui_config->menu_mnemonics);
break;
case PROP_LAST_OPENED_SIZE:
g_value_set_int (value, gui_config->last_opened_size);
break;
@ -555,6 +550,7 @@ gimp_gui_config_get_property (GObject *object,
break;
case PROP_INFO_WINDOW_PER_DISPLAY:
case PROP_MENU_MNEMONICS:
case PROP_SHOW_TOOL_TIPS:
case PROP_SHOW_TIPS:
/* ignored */

View file

@ -52,7 +52,6 @@ struct _GimpGuiConfig
gboolean can_change_accels;
gboolean save_accels;
gboolean restore_accels;
gboolean menu_mnemonics;
gint last_opened_size;
guint64 max_new_image_size;
gboolean toolbox_color_area;

View file

@ -213,8 +213,7 @@ gimp_filtered_container_set_property (GObject *object,
switch (property_id)
{
case PROP_SRC_CONTAINER:
filtered_container->src_container = g_value_get_object (value);
g_object_ref (filtered_container->src_container);
filtered_container->src_container = g_value_dup_object (value);
g_signal_connect (filtered_container->src_container, "add",
G_CALLBACK (gimp_filtered_container_src_add),

View file

@ -146,7 +146,7 @@ about_dialog_create (GimpContext *context)
dialog);
/* kids, don't try this at home! */
container = GTK_DIALOG (widget)->vbox;
container = gtk_dialog_get_content_area (GTK_DIALOG (widget));
children = gtk_container_get_children (GTK_CONTAINER (container));
if (GTK_IS_VBOX (children->data))

View file

@ -124,7 +124,8 @@ channel_options_dialog_new (GimpImage *image,
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->dialog)->vbox), hbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
hbox);
gtk_widget_show (hbox);
vbox = gtk_vbox_new (FALSE, 6);

View file

@ -158,7 +158,7 @@ convert_dialog_new (GimpImage *image,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)->vbox),
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_vbox);
gtk_widget_show (main_vbox);

View file

@ -141,7 +141,8 @@ fade_dialog_new (GimpImage *image,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
table = gtk_table_new (3, 3, FALSE);

View file

@ -90,7 +90,7 @@ file_open_location_dialog_new (Gimp *gimp)
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);

View file

@ -108,7 +108,7 @@ grid_dialog_new (GimpImage *image,
editor = gimp_grid_editor_new (grid, context, xres, yres);
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
editor);
gtk_widget_show (editor);

View file

@ -85,7 +85,8 @@ image_merge_layers_dialog_new (GimpImage *image,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
vbox);
gtk_widget_show (vbox);
frame = gimp_int_radio_group_new (TRUE, _("Final, Merged Layer should be:"),

View file

@ -122,7 +122,7 @@ image_new_dialog_new (GimpContext *context)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);

View file

@ -74,8 +74,8 @@ image_properties_dialog_new (GimpImage *image,
NULL);
notebook = gtk_notebook_new ();
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
notebook, FALSE, FALSE, 0);
gtk_widget_show (notebook);
view = gimp_image_prop_view_new (image);

View file

@ -61,7 +61,8 @@ keyboard_shortcuts_dialog_new (Gimp *gimp)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_widget_show (vbox);
editor = gimp_action_editor_new (gimp_ui_managers_from_name ("<Image>")->data,

View file

@ -102,7 +102,8 @@ layer_add_mask_dialog_new (GimpLayer *layer,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
vbox);
gtk_widget_show (vbox);
frame =

View file

@ -109,7 +109,7 @@ layer_options_dialog_new (GimpImage *image,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->dialog)->vbox),
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
vbox);
gtk_widget_show (vbox);

View file

@ -143,7 +143,8 @@ module_dialog_new (Gimp *gimp)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (shell)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (shell))),
vbox);
gtk_widget_show (vbox);
dialog->hint = gimp_hint_box_new (_("You will have to restart GIMP "

View file

@ -144,7 +144,7 @@ offset_dialog_new (GimpDrawable *drawable,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)->vbox),
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_vbox);
gtk_widget_show (main_vbox);

View file

@ -189,7 +189,7 @@ palette_import_dialog_new (GimpContext *context)
main_hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)->vbox),
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
main_hbox);
gtk_widget_show (main_hbox);

View file

@ -1437,7 +1437,8 @@ prefs_dialog_new (Gimp *gimp,
/* The main hbox */
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox);
gtk_widget_show (hbox);
/* The categories tree */
@ -1632,9 +1633,6 @@ prefs_dialog_new (Gimp *gimp,
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"),
GTK_CONTAINER (vbox), FALSE);
prefs_check_button_add (object, "menu-mnemonics",
_("Show menu _mnemonics (access keys)"),
GTK_BOX (vbox2));
prefs_check_button_add (object, "can-change-accels",
_("_Use dynamic keyboard shortcuts"),
GTK_BOX (vbox2));

View file

@ -137,7 +137,7 @@ print_size_dialog_new (GimpImage *image,
frame = gimp_frame_new (_("Print Size"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
frame, FALSE, FALSE, 0);
gtk_widget_show (frame);

View file

@ -184,7 +184,8 @@ resize_dialog_new (GimpViewable *viewable,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
frame = gimp_frame_new (text);

View file

@ -92,7 +92,8 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
table = gtk_table_new (4, 4, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table);
gtk_widget_show (table);
if (pixbuf)

View file

@ -162,7 +162,8 @@ scale_dialog_new (GimpViewable *viewable,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_widget_show (vbox);
frame = gimp_frame_new (text);

View file

@ -123,7 +123,8 @@ stroke_dialog_new (GimpItem *item,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
radio_box = gimp_prop_enum_radio_box_new (G_OBJECT (options), "method",

View file

@ -103,7 +103,8 @@ template_options_dialog_new (GimpTemplate *template,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
vbox);
gtk_widget_show (vbox);
options->editor = gimp_template_editor_new (template, options->gimp, TRUE);

View file

@ -156,7 +156,7 @@ tips_dialog_create (Gimp *gimp)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (tips_dialog)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (tips_dialog))),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);

View file

@ -97,8 +97,8 @@ user_install_dialog_new (GimpUserInstall *install)
frame = gimp_frame_new (_("Installation Log"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
scrolled = gtk_scrolled_window_new (NULL, NULL);

View file

@ -101,7 +101,8 @@ vectors_options_dialog_new (GimpImage *image,
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->dialog)->vbox), hbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (options->dialog))),
hbox);
gtk_widget_show (hbox);
vbox = gtk_vbox_new (FALSE, 6);

View file

@ -246,7 +246,8 @@ gimp_displays_get_num_visible (Gimp *gimp)
if (GTK_WIDGET_DRAWABLE (display->shell))
{
GdkWindowState state = gdk_window_get_state (display->shell->window);
GdkWindow *window = gtk_widget_get_window (display->shell);
GdkWindowState state = gdk_window_get_state (window);
if ((state & (GDK_WINDOW_STATE_WITHDRAWN |
GDK_WINDOW_STATE_ICONIFIED)) == 0)

View file

@ -456,7 +456,7 @@ gimp_display_shell_space_pressed (GimpDisplayShell *shell,
gimp_display_shell_start_scrolling (shell, coords.x, coords.y);
gdk_pointer_grab (shell->canvas->window, FALSE,
gdk_pointer_grab (gtk_widget_get_window (shell->canvas), FALSE,
GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK,
NULL, NULL, time);
@ -482,7 +482,7 @@ gimp_display_shell_space_pressed (GimpDisplayShell *shell,
break;
}
gdk_keyboard_grab (shell->canvas->window, FALSE, time);
gdk_keyboard_grab (gtk_widget_get_window (shell->canvas), FALSE, time);
shell->space_pressed = TRUE;
}
@ -839,7 +839,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
/* we expect a FOCUS_IN event to follow, but can't rely
* on it, so force one
*/
gdk_window_focus (canvas->window, time);
gdk_window_focus (gtk_widget_get_window (canvas), time);
}
/* ignore new mouse events */
@ -871,11 +871,11 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
}
}
gdk_pointer_grab (canvas->window,
gdk_pointer_grab (gtk_widget_get_window (canvas),
FALSE, event_mask, NULL, NULL, time);
if (! shell->space_pressed && ! shell->space_release_pending)
gdk_keyboard_grab (canvas->window, FALSE, time);
gdk_keyboard_grab (gtk_widget_get_window (canvas), FALSE, time);
if (active_tool &&
(! gimp_image_is_empty (image) ||
@ -1174,9 +1174,12 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
value = (gtk_adjustment_get_value (adj) +
((direction == GDK_SCROLL_UP ||
direction == GDK_SCROLL_LEFT) ?
-adj->page_increment / 2 :
adj->page_increment / 2));
value = CLAMP (value, adj->lower, adj->upper - adj->page_size);
-gtk_adjustment_get_page_increment (adj) / 2 :
gtk_adjustment_get_page_increment (adj) / 2));
value = CLAMP (value,
gtk_adjustment_get_lower (adj),
gtk_adjustment_get_upper (adj) -
gtk_adjustment_get_page_size (adj));
gtk_adjustment_set_value (adj, value);
}
@ -1749,17 +1752,18 @@ gimp_display_shell_ruler_button_press (GtkWidget *widget,
/* we expect a FOCUS_IN event to follow, but can't rely
* on it, so force one
*/
gdk_window_focus (shell->canvas->window,
gdk_window_focus (gtk_widget_get_window (shell->canvas),
gdk_event_get_time ((GdkEvent *) event));
}
gdk_pointer_grab (shell->canvas->window, FALSE,
gdk_pointer_grab (gtk_widget_get_window (shell->canvas), FALSE,
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL, NULL, event->time);
gdk_keyboard_grab (shell->canvas->window, FALSE, event->time);
gdk_keyboard_grab (gtk_widget_get_window (shell->canvas),
FALSE, event->time);
if (sample_point)
gimp_color_tool_start_sample_point (active_tool, display);
@ -1834,11 +1838,11 @@ void
gimp_display_shell_quick_mask_toggled (GtkWidget *widget,
GimpDisplayShell *shell)
{
if (GTK_TOGGLE_BUTTON (widget)->active !=
gimp_image_get_quick_mask_state (shell->display->image))
gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
if (active != gimp_image_get_quick_mask_state (shell->display->image))
{
gimp_image_set_quick_mask_state (shell->display->image,
GTK_TOGGLE_BUTTON (widget)->active);
gimp_image_set_quick_mask_state (shell->display->image, active);
gimp_image_flush (shell->display->image);
}
@ -2175,7 +2179,7 @@ gimp_display_shell_canvas_expose_drop_zone (GimpDisplayShell *shell,
{
cairo_t *cr;
cr = gdk_cairo_create (shell->canvas->window);
cr = gdk_cairo_create (gtk_widget_get_window (shell->canvas));
gdk_cairo_region (cr, eevent->region);
cairo_clip (cr);

View file

@ -92,7 +92,8 @@ gimp_display_shell_get_device_coords (GimpDisplayShell *shell,
{
gdouble axes[GDK_AXIS_LAST];
gdk_device_get_state (device, shell->canvas->window, axes, NULL);
gdk_device_get_state (device, gtk_widget_get_window (shell->canvas),
axes, NULL);
gdk_device_get_axis (device, axes, GDK_AXIS_X, &coords->x);
gdk_device_get_axis (device, axes, GDK_AXIS_Y, &coords->y);
@ -186,7 +187,8 @@ gimp_display_shell_get_device_state (GimpDisplayShell *shell,
GdkDevice *device,
GdkModifierType *state)
{
gdk_device_get_state (device, shell->canvas->window, NULL, state);
gdk_device_get_state (device, gtk_widget_get_window (shell->canvas),
NULL, state);
}
/**

View file

@ -231,7 +231,7 @@ gimp_display_shell_real_set_cursor (GimpDisplayShell *shell,
shell->current_cursor = cursor_type;
if (GTK_WIDGET_DRAWABLE (shell->canvas))
gdk_window_set_cursor (shell->canvas->window, NULL);
gdk_window_set_cursor (gtk_widget_get_window (shell->canvas), NULL);
return;
}

View file

@ -146,7 +146,7 @@ gimp_display_shell_draw_guide (const GimpDisplayShell *shell,
x1 = 0;
y1 = 0;
gdk_drawable_get_size (shell->canvas->window, &x2, &y2);
gdk_drawable_get_size (gtk_widget_get_window (shell->canvas), &x2, &y2);
switch (gimp_guide_get_orientation (guide))
{
@ -429,7 +429,7 @@ gimp_display_shell_draw_sample_point (const GimpDisplayShell *shell,
y1 = floor (y - GIMP_SAMPLE_POINT_DRAW_SIZE);
y2 = ceil (y + GIMP_SAMPLE_POINT_DRAW_SIZE);
gdk_drawable_get_size (shell->canvas->window, &w, &h);
gdk_drawable_get_size (gtk_widget_get_window (shell->canvas), &w, &h);
if (x < - GIMP_SAMPLE_POINT_DRAW_SIZE ||
y < - GIMP_SAMPLE_POINT_DRAW_SIZE ||
@ -663,7 +663,7 @@ gimp_display_shell_get_grid_gc (GimpDisplayShell *shell,
values.join_style = GDK_JOIN_MITER;
shell->grid_gc = gdk_gc_new_with_values (shell->canvas->window,
shell->grid_gc = gdk_gc_new_with_values (gtk_widget_get_window (shell->canvas),
&values, (GDK_GC_LINE_STYLE |
GDK_GC_JOIN_STYLE));
@ -692,7 +692,7 @@ gimp_display_shell_get_pen_gc (GimpDisplayShell *shell,
values.cap_style = GDK_CAP_ROUND;
values.join_style = GDK_JOIN_ROUND;
shell->pen_gc = gdk_gc_new_with_values (shell->canvas->window,
shell->pen_gc = gdk_gc_new_with_values (gtk_widget_get_window (shell->canvas),
&values, (GDK_GC_LINE_STYLE |
GDK_GC_CAP_STYLE |
GDK_GC_JOIN_STYLE));

View file

@ -116,7 +116,8 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
editor = gimp_color_display_editor_new (shell->filter_stack);
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (cdd->dialog)->vbox), editor);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (cdd->dialog))),
editor);
gtk_widget_show (editor);
return cdd->dialog;

View file

@ -93,7 +93,7 @@ gimp_display_shell_layer_select_init (GimpDisplayShell *shell,
gtk_widget_show (layer_select->shell);
gdk_keyboard_grab (layer_select->shell->window, FALSE, time);
gdk_keyboard_grab (gtk_widget_get_window (layer_select->shell), FALSE, time);
}

View file

@ -318,10 +318,10 @@ gimp_display_shell_preview_transform (GimpDisplayShell *shell)
k = columns * rows;
for (j = 0; j < k; j++)
gimp_display_shell_draw_quad (tool->drawable,
GDK_DRAWABLE (GTK_WIDGET (shell->canvas)->window),
mask, mask_offx, mask_offy,
x[j], y[j], u[j], v[j],
opacity);
GDK_DRAWABLE (gtk_widget_get_window (shell->canvas)),
mask, mask_offx, mask_offy,
x[j], y[j], u[j], v[j],
opacity);
}

View file

@ -51,7 +51,8 @@ gimp_display_shell_progress_start (GimpProgress *progress,
if (progress && gimp_display_shell_is_iconified (shell))
{
gdk_window_set_title (GTK_WIDGET (shell)->window, message);
gdk_window_set_title (gtk_widget_get_window (GTK_WIDGET (shell)),
message);
}
return progress;
@ -87,7 +88,8 @@ gimp_display_shell_progress_set_text (GimpProgress *progress,
if (gimp_progress_is_active (GIMP_PROGRESS (shell->statusbar)) &&
gimp_display_shell_is_iconified (shell))
{
gdk_window_set_title (GTK_WIDGET (shell)->window, message);
gdk_window_set_title (gtk_widget_get_window (GTK_WIDGET (shell)),
message);
}
}
@ -165,7 +167,8 @@ gimp_display_shell_is_iconified (GimpDisplayShell *shell)
GtkWidget *widget = GTK_WIDGET (shell);
return (GTK_WIDGET_DRAWABLE (widget) &&
gdk_window_get_state (widget->window) == GDK_WINDOW_STATE_ICONIFIED);
gdk_window_get_state (gtk_widget_get_window (widget)) ==
GDK_WINDOW_STATE_ICONIFIED);
}
@ -195,7 +198,8 @@ gimp_display_shell_progress_window_state_changed (GimpDisplayShell *shell)
"progress");
if (msg)
{
gdk_window_set_title (GTK_WIDGET (shell)->window, msg);
gdk_window_set_title (gtk_widget_get_window (GTK_WIDGET (shell)),
msg);
return;
}
}

View file

@ -147,7 +147,7 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (shell->scale_dialog)->vbox),
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (shell->scale_dialog))),
table);
gtk_widget_show (table);

View file

@ -107,7 +107,8 @@ gimp_display_shell_update_title_idle (gpointer data)
g_strlcpy (title + len, GIMP_ACRONYM, sizeof (title) - len);
gdk_window_set_title (GTK_WIDGET (shell)->window, title);
gdk_window_set_title (gtk_widget_get_window (GTK_WIDGET (shell)),
title);
/* format the statusbar */
gimp_display_shell_format_title (shell, title, sizeof (title),
@ -118,7 +119,8 @@ gimp_display_shell_update_title_idle (gpointer data)
}
else
{
gdk_window_set_title (GTK_WIDGET (shell)->window, GIMP_NAME);
gdk_window_set_title (gtk_widget_get_window (GTK_WIDGET (shell)),
GIMP_NAME);
gimp_statusbar_replace (GIMP_STATUSBAR (shell->statusbar), "title",
NULL, " ");

View file

@ -277,7 +277,8 @@ gimp_navigation_editor_popup (GimpDisplayShell *shell,
gint border_width, border_height;
gint screen_click_x, screen_click_y;
gdk_window_get_origin (widget->window, &x_origin, &y_origin);
gdk_window_get_origin (gtk_widget_get_window (widget),
&x_origin, &y_origin);
screen_click_x = x_origin + click_x;
screen_click_y = y_origin + click_y;

View file

@ -368,7 +368,7 @@ gimp_statusbar_progress_start (GimpProgress *progress,
}
if (GTK_WIDGET_DRAWABLE (bar))
gdk_window_process_updates (bar->window, TRUE);
gdk_window_process_updates (gtk_widget_get_window (bar), TRUE);
return progress;
}
@ -426,7 +426,7 @@ gimp_statusbar_progress_set_text (GimpProgress *progress,
gimp_statusbar_replace (statusbar, "progress", NULL, "%s", message);
if (GTK_WIDGET_DRAWABLE (bar))
gdk_window_process_updates (bar->window, TRUE);
gdk_window_process_updates (gtk_widget_get_window (bar), TRUE);
}
}
@ -450,7 +450,7 @@ gimp_statusbar_progress_set_value (GimpProgress *progress,
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), percentage);
if (GTK_WIDGET_DRAWABLE (bar))
gdk_window_process_updates (bar->window, TRUE);
gdk_window_process_updates (gtk_widget_get_window (bar), TRUE);
}
}
}
@ -480,7 +480,7 @@ gimp_statusbar_progress_pulse (GimpProgress *progress)
gtk_progress_bar_pulse (GTK_PROGRESS_BAR (bar));
if (GTK_WIDGET_DRAWABLE (bar))
gdk_window_process_updates (bar->window, TRUE);
gdk_window_process_updates (gtk_widget_get_window (bar), TRUE);
}
}
@ -1269,7 +1269,8 @@ gimp_statusbar_label_expose (GtkWidget *widget,
PANGO_PIXELS (rect.width) : 0);
y += PANGO_PIXELS (rect.y);
gdk_draw_pixbuf (widget->window, gtk_widget_get_style (widget)->black_gc,
gdk_draw_pixbuf (gtk_widget_get_window (widget),
gtk_widget_get_style (widget)->black_gc,
statusbar->icon,
0, 0,
x, y,

View file

@ -89,12 +89,12 @@ gimp_operation_levels_map (gdouble value,
else
value = (value - low_input);
/* clamp to new black and white points */
value = CLAMP (value, 0.0, 1.0);
if (inv_gamma != 1.0)
{
if (value >= 0.0)
value = pow ( value, inv_gamma);
else
value = -pow (-value, inv_gamma);
value = pow ( value, inv_gamma);
}
/* determine the output intensity */

View file

@ -171,7 +171,8 @@ gui_abort (const gchar *abort_message)
gimp_message_box_set_text (GIMP_MESSAGE_BOX (box), "%s", abort_message);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), box);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
box);
gtk_widget_show (box);
gimp_dialog_run (GIMP_DIALOG (dialog));

View file

@ -334,8 +334,8 @@ gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool)
hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (picker_tool->dialog)->vbox), hbox,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (picker_tool->dialog))),
hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
picker_tool->color_frame1 = gimp_color_frame_new ();

View file

@ -304,7 +304,8 @@ gimp_image_map_tool_initialize (GimpTool *tool,
image_map_tool->main_vbox = vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (shell)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (shell))),
vbox);
if (klass->settings_name)
gimp_image_map_tool_add_settings_gui (image_map_tool);

View file

@ -1006,7 +1006,8 @@ gimp_measure_tool_dialog_new (GimpMeasureTool *measure)
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table);
gtk_widget_show (table);

View file

@ -114,8 +114,8 @@ gimp_perspective_tool_dialog (GimpTransformTool *tr_tool)
frame = gimp_frame_new (_("Transformation Matrix"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (tr_tool->dialog)->vbox), frame,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (tr_tool->dialog))),
frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (3, 3, FALSE);

View file

@ -177,8 +177,8 @@ gimp_rotate_tool_dialog (GimpTransformTool *tr_tool)
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacing (GTK_TABLE (table), 1, 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (tr_tool->dialog)->vbox), table,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (tr_tool->dialog))),
table, FALSE, FALSE, 0);
gtk_widget_show (table);
button = gimp_spin_button_new (&rotate->angle_adj,

View file

@ -170,8 +170,8 @@ gimp_scale_tool_prepare (GimpTransformTool *tr_tool,
NULL);
gtk_container_set_border_width (GTK_CONTAINER (scale->box), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (tr_tool->dialog)->vbox), scale->box,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (tr_tool->dialog))),
scale->box, FALSE, FALSE, 0);
gtk_widget_show (scale->box);
g_signal_connect (scale->box, "notify",

View file

@ -123,8 +123,8 @@ gimp_shear_tool_dialog (GimpTransformTool *tr_tool)
gtk_container_set_border_width (GTK_CONTAINER (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (tr_tool->dialog)->vbox), table,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (tr_tool->dialog))),
table, FALSE, FALSE, 0);
gtk_widget_show (table);
button = gimp_spin_button_new (&shear->x_adj,

View file

@ -2376,7 +2376,7 @@ gimp_text_tool_confirm_dialog (GimpTextTool *text_tool)
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);

View file

@ -81,8 +81,7 @@ gimp_action_factory_finalize (GObject *object)
}
GimpActionFactory *
gimp_action_factory_new (Gimp *gimp,
gboolean mnemonics)
gimp_action_factory_new (Gimp *gimp)
{
GimpActionFactory *factory;
@ -90,8 +89,7 @@ gimp_action_factory_new (Gimp *gimp,
factory = g_object_new (GIMP_TYPE_ACTION_FACTORY, NULL);
factory->gimp = gimp;
factory->mnemonics = mnemonics ? TRUE : FALSE;
factory->gimp = gimp;
return factory;
}
@ -146,7 +144,6 @@ gimp_action_factory_group_new (GimpActionFactory *factory,
entry->identifier,
entry->label,
entry->stock_id,
factory->mnemonics,
user_data,
entry->update_func);

View file

@ -53,8 +53,6 @@ struct _GimpActionFactory
Gimp *gimp;
GList *registered_groups;
gboolean mnemonics;
};
struct _GimpActionFactoryClass
@ -65,8 +63,7 @@ struct _GimpActionFactoryClass
GType gimp_action_factory_get_type (void) G_GNUC_CONST;
GimpActionFactory * gimp_action_factory_new (Gimp *gimp,
gboolean mnemonics);
GimpActionFactory * gimp_action_factory_new (Gimp *gimp);
void gimp_action_factory_group_register (GimpActionFactory *factory,
const gchar *identifier,

View file

@ -46,8 +46,7 @@ enum
PROP_0,
PROP_GIMP,
PROP_LABEL,
PROP_STOCK_ID,
PROP_MNEMONICS
PROP_STOCK_ID
};
@ -103,13 +102,6 @@ gimp_action_group_class_init (GimpActionGroupClass *klass)
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_MNEMONICS,
g_param_spec_boolean ("mnemonics",
NULL, NULL,
TRUE,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
klass->groups = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
}
@ -223,9 +215,7 @@ gimp_action_group_set_property (GObject *object,
case PROP_STOCK_ID:
group->stock_id = g_value_dup_string (value);
break;
case PROP_MNEMONICS:
group->mnemonics = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -251,9 +241,7 @@ gimp_action_group_get_property (GObject *object,
case PROP_STOCK_ID:
g_value_set_string (value, group->stock_id);
break;
case PROP_MNEMONICS:
g_value_set_boolean (value, group->mnemonics);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@ -283,7 +271,6 @@ gimp_action_group_check_unique_action (GimpActionGroup *group,
* @name: the name of the action group.
* @label: the user visible label of the action group.
* @stock_id: the icon of the action group.
* @mnemonics: whether or not to show mnemonics.
* @user_data: the user_data for #GtkAction callbacks.
* @update_func: the function that will be called on
* gimp_action_group_update().
@ -299,7 +286,6 @@ gimp_action_group_new (Gimp *gimp,
const gchar *name,
const gchar *label,
const gchar *stock_id,
gboolean mnemonics,
gpointer user_data,
GimpActionGroupUpdateFunc update_func)
{
@ -313,7 +299,6 @@ gimp_action_group_new (Gimp *gimp,
"name", name,
"label", label,
"stock-id", stock_id,
"mnemonics", mnemonics,
NULL);
group->user_data = user_data;
@ -362,7 +347,7 @@ gimp_action_group_add_actions (GimpActionGroup *group,
for (i = 0; i < n_entries; i++)
{
GimpAction *action;
gchar *label;
const gchar *label;
const gchar *tooltip = NULL;
if (! gimp_action_group_check_unique_action (group, entries[i].name))
@ -370,7 +355,7 @@ gimp_action_group_add_actions (GimpActionGroup *group,
if (msg_context)
{
label = (gchar *) g_dpgettext2 (NULL, msg_context, entries[i].label);
label = g_dpgettext2 (NULL, msg_context, entries[i].label);
if (entries[i].tooltip)
tooltip = g_dpgettext2 (NULL, msg_context, entries[i].tooltip);
@ -381,15 +366,9 @@ gimp_action_group_add_actions (GimpActionGroup *group,
tooltip = gettext (entries[i].tooltip);
}
if (! group->mnemonics)
label = gimp_strip_uline (label);
action = gimp_action_new (entries[i].name, label, tooltip,
entries[i].stock_id);
if (! group->mnemonics)
g_free (label);
if (entries[i].callback)
g_signal_connect (action, "activate",
entries[i].callback,
@ -421,7 +400,7 @@ gimp_action_group_add_toggle_actions (GimpActionGroup *group,
for (i = 0; i < n_entries; i++)
{
GtkToggleAction *action;
gchar *label;
const gchar *label;
const gchar *tooltip = NULL;
if (! gimp_action_group_check_unique_action (group, entries[i].name))
@ -429,7 +408,7 @@ gimp_action_group_add_toggle_actions (GimpActionGroup *group,
if (msg_context)
{
label = (gchar *) g_dpgettext2 (NULL, msg_context, entries[i].label);
label = g_dpgettext2 (NULL, msg_context, entries[i].label);
if (entries[i].tooltip)
tooltip = g_dpgettext2 (NULL, msg_context, entries[i].tooltip);
@ -440,15 +419,9 @@ gimp_action_group_add_toggle_actions (GimpActionGroup *group,
tooltip = gettext (entries[i].tooltip);
}
if (! group->mnemonics)
label = gimp_strip_uline (label);
action = gimp_toggle_action_new (entries[i].name, label, tooltip,
entries[i].stock_id);
if (! group->mnemonics)
g_free (label);
gtk_toggle_action_set_active (action, entries[i].is_active);
if (entries[i].callback)
@ -486,7 +459,7 @@ gimp_action_group_add_radio_actions (GimpActionGroup *group,
for (i = 0; i < n_entries; i++)
{
GtkRadioAction *action;
gchar *label;
const gchar *label;
const gchar *tooltip = NULL;
if (! gimp_action_group_check_unique_action (group, entries[i].name))
@ -494,7 +467,7 @@ gimp_action_group_add_radio_actions (GimpActionGroup *group,
if (msg_context)
{
label = (gchar *) g_dpgettext2 (NULL, msg_context, entries[i].label);
label = g_dpgettext2 (NULL, msg_context, entries[i].label);
if (entries[i].tooltip)
tooltip = g_dpgettext2 (NULL, msg_context, entries[i].tooltip);
@ -505,16 +478,10 @@ gimp_action_group_add_radio_actions (GimpActionGroup *group,
tooltip = gettext (entries[i].tooltip);
}
if (! group->mnemonics)
label = gimp_strip_uline (label);
action = gimp_radio_action_new (entries[i].name, label, tooltip,
entries[i].stock_id,
entries[i].value);
if (! group->mnemonics)
g_free (label);
if (i == 0)
first_action = action;
@ -558,7 +525,7 @@ gimp_action_group_add_enum_actions (GimpActionGroup *group,
for (i = 0; i < n_entries; i++)
{
GimpEnumAction *action;
gchar *label;
const gchar *label;
const gchar *tooltip = NULL;
if (! gimp_action_group_check_unique_action (group, entries[i].name))
@ -566,7 +533,7 @@ gimp_action_group_add_enum_actions (GimpActionGroup *group,
if (msg_context)
{
label = (gchar *) g_dpgettext2 (NULL, msg_context, entries[i].label);
label = g_dpgettext2 (NULL, msg_context, entries[i].label);
if (entries[i].tooltip)
tooltip = g_dpgettext2 (NULL, msg_context, entries[i].tooltip);
@ -577,17 +544,11 @@ gimp_action_group_add_enum_actions (GimpActionGroup *group,
tooltip = gettext (entries[i].tooltip);
}
if (! group->mnemonics)
label = gimp_strip_uline (label);
action = gimp_enum_action_new (entries[i].name, label, tooltip,
entries[i].stock_id,
entries[i].value,
entries[i].value_variable);
if (! group->mnemonics)
g_free (label);
if (callback)
g_signal_connect (action, "selected",
callback,
@ -620,7 +581,7 @@ gimp_action_group_add_string_actions (GimpActionGroup *group,
for (i = 0; i < n_entries; i++)
{
GimpStringAction *action;
gchar *label;
const gchar *label;
const gchar *tooltip = NULL;
if (! gimp_action_group_check_unique_action (group, entries[i].name))
@ -628,7 +589,7 @@ gimp_action_group_add_string_actions (GimpActionGroup *group,
if (msg_context)
{
label = (gchar *) g_dpgettext2 (NULL, msg_context, entries[i].label);
label = g_dpgettext2 (NULL, msg_context, entries[i].label);
if (entries[i].tooltip)
tooltip = g_dpgettext2 (NULL, msg_context, entries[i].tooltip);
@ -639,16 +600,10 @@ gimp_action_group_add_string_actions (GimpActionGroup *group,
tooltip = gettext (entries[i].tooltip);
}
if (! group->mnemonics)
label = gimp_strip_uline (label);
action = gimp_string_action_new (entries[i].name, label, tooltip,
entries[i].stock_id,
entries[i].value);
if (! group->mnemonics)
g_free (label);
if (callback)
g_signal_connect (action, "selected",
callback,
@ -680,25 +635,16 @@ gimp_action_group_add_plug_in_actions (GimpActionGroup *group,
for (i = 0; i < n_entries; i++)
{
GimpPlugInAction *action;
gchar *label;
if (! gimp_action_group_check_unique_action (group, entries[i].name))
continue;
label = (gchar *) entries[i].label;
if (! group->mnemonics)
label = gimp_strip_uline (label);
action = gimp_plug_in_action_new (entries[i].name,
label,
entries[i].label,
entries[i].tooltip,
entries[i].stock_id,
entries[i].procedure);
if (! group->mnemonics)
g_free (label);
if (callback)
g_signal_connect (action, "selected",
callback,
@ -822,7 +768,6 @@ gimp_action_group_set_action_label (GimpActionGroup *group,
const gchar *label)
{
GtkAction *action;
gchar *stripped;
g_return_if_fail (GIMP_IS_ACTION_GROUP (group));
g_return_if_fail (action_name != NULL);
@ -837,15 +782,7 @@ gimp_action_group_set_action_label (GimpActionGroup *group,
return;
}
if (! group->mnemonics)
stripped = gimp_strip_uline (label);
else
stripped = (gchar *) label;
gtk_action_set_label (action, stripped);
if (! group->mnemonics)
g_free (stripped);
gtk_action_set_label (action, label);
}
void

View file

@ -39,7 +39,6 @@ struct _GimpActionGroup
Gimp *gimp;
gchar *label;
gchar *stock_id;
gboolean mnemonics;
gpointer user_data;
@ -134,7 +133,6 @@ GimpActionGroup *gimp_action_group_new (Gimp *gimp,
const gchar *name,
const gchar *label,
const gchar *stock_id,
gboolean mnemonics,
gpointer user_data,
GimpActionGroupUpdateFunc update_func);

View file

@ -36,12 +36,14 @@
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "gimpactiongroup.h"
#include "gimpchanneltreeview.h"
#include "gimpcomponenteditor.h"
#include "gimpcontainerview.h"
#include "gimpdnd.h"
#include "gimpdocked.h"
#include "gimphelp-ids.h"
#include "gimpuimanager.h"
#include "gimpwidgets-utils.h"
#include "gimp-intl.h"
@ -77,6 +79,11 @@ static void gimp_channel_tree_view_set_context (GimpContainerView *view,
GimpContext *context);
static void gimp_channel_tree_view_set_view_size (GimpContainerView *view);
static void gimp_channel_tree_view_channel_clicked (GimpCellRendererViewable *cell,
const gchar *path_str,
GdkModifierType state,
GimpContainerTreeView *tree_view);
G_DEFINE_TYPE_WITH_CODE (GimpChannelTreeView, gimp_channel_tree_view,
GIMP_TYPE_DRAWABLE_TREE_VIEW,
@ -165,6 +172,10 @@ gimp_channel_tree_view_constructor (GType type,
view = GIMP_CHANNEL_TREE_VIEW (object);
tree_view = GIMP_CONTAINER_TREE_VIEW (object);
g_signal_connect (tree_view->renderer_cell, "clicked",
G_CALLBACK (gimp_channel_tree_view_channel_clicked),
view);
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_LAYER,
NULL, tree_view);
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_LAYER_MASK,
@ -374,3 +385,38 @@ gimp_channel_tree_view_set_view_size (GimpContainerView *view)
gimp_component_editor_set_view_size (GIMP_COMPONENT_EDITOR (channel_view->priv->component_editor),
view_size);
}
/* signal handlers */
static void
gimp_channel_tree_view_channel_clicked (GimpCellRendererViewable *cell,
const gchar *path_str,
GdkModifierType state,
GimpContainerTreeView *tree_view)
{
if (state & GDK_MOD1_MASK)
{
GimpUIManager *ui_manager = GIMP_EDITOR (tree_view)->ui_manager;
GimpActionGroup *group;
const gchar *action = "channels-selection-replace";
group = gimp_ui_manager_get_action_group (ui_manager, "channels");
if ((state & GDK_SHIFT_MASK) && (state & GDK_CONTROL_MASK))
{
action = "channels-selection-intersect";
}
else if (state & GDK_SHIFT_MASK)
{
action = "channels-selection-add";
}
else if (state & GDK_CONTROL_MASK)
{
action = "channels-selection-subtract";
}
gimp_action_group_activate_action (group, action);
}
}

View file

@ -30,18 +30,25 @@
#include "widgets-types.h"
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "core/gimptemplate.h"
#include "gimpimagecommenteditor.h"
#include "gimp-intl.h"
#define GIMP_IMAGE_COMMENT_PARASITE "gimp-comment"
static void gimp_image_comment_editor_update (GimpImageParasiteView *view);
static void gimp_image_comment_editor_update (GimpImageParasiteView *view);
static void gimp_image_comment_editor_buffer_changed (GtkTextBuffer *buffer,
GimpImageCommentEditor *editor);
static void gimp_image_comment_editor_buffer_changed (GtkTextBuffer *buffer,
GimpImageCommentEditor *editor);
static void gimp_image_comment_editor_use_default_comment (GtkWidget *button,
GimpImageCommentEditor *editor);
G_DEFINE_TYPE (GimpImageCommentEditor,
@ -60,20 +67,30 @@ gimp_image_comment_editor_class_init (GimpImageCommentEditorClass *klass)
static void
gimp_image_comment_editor_init (GimpImageCommentEditor *editor)
{
GtkWidget *vbox;
GtkWidget *scrolled_window;
GtkWidget *text_view;
GtkWidget *button;
/* Init */
editor->recoursing = FALSE;
/* Vbox */
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (editor), vbox);
gtk_widget_show (vbox);
/* Scrolled winow */
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 2);
gtk_container_add (GTK_CONTAINER (editor), scrolled_window);
gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, TRUE, TRUE, 0);
gtk_widget_show (scrolled_window);
/* Text view */
text_view = gtk_text_view_new ();
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), TRUE);
@ -86,6 +103,21 @@ gimp_image_comment_editor_init (GimpImageCommentEditor *editor)
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
gtk_widget_show (text_view);
/* Button */
button = gtk_button_new_with_label (_("Use default comment"));
gimp_help_set_help_data (GTK_WIDGET (button),
_("Replace the current image comment with the "
"default comment set in "
"Edit→Preferences→Default Image."),
NULL);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
gtk_widget_show (button);
g_signal_connect (button, "clicked",
G_CALLBACK (gimp_image_comment_editor_use_default_comment),
editor);
/* Buffer */
editor->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
g_signal_connect (editor->buffer, "changed",
@ -192,3 +224,16 @@ gimp_image_comment_editor_buffer_changed (GtkTextBuffer *buffer,
g_free (text);
}
static void
gimp_image_comment_editor_use_default_comment (GtkWidget *button,
GimpImageCommentEditor *editor)
{
GimpImage *image = gimp_image_parasite_view_get_image (GIMP_IMAGE_PARASITE_VIEW (editor));
const gchar *comment = image ? image->gimp->config->default_image->comment : NULL;
if (comment)
gtk_text_buffer_set_text (editor->buffer, comment, -1);
else
gtk_text_buffer_set_text (editor->buffer, "", -1);
}

View file

@ -94,10 +94,15 @@ gimp_language_entry_constructor (GType type,
completion = g_object_new (GTK_TYPE_ENTRY_COMPLETION,
"model", entry->store,
"text-column", GIMP_LANGUAGE_STORE_LANGUAGE,
"inline-selection", TRUE,
NULL);
/* Note that we must use this function to set the text column,
* otherwise we won't get a cell renderer for free
*/
gtk_entry_completion_set_text_column (completion,
GIMP_LANGUAGE_STORE_LANGUAGE);
gtk_entry_set_completion (GTK_ENTRY (entry), completion);
g_object_unref (completion);
}

View file

@ -1319,25 +1319,48 @@ gimp_layer_tree_view_layer_clicked (GimpCellRendererViewable *cell,
if (gtk_tree_model_get_iter (tree_view->model, &iter, path))
{
GimpViewRenderer *renderer;
GimpUIManager *ui_manager;
GimpActionGroup *group;
GimpUIManager *ui_manager = GIMP_EDITOR (tree_view)->ui_manager;
GimpActionGroup *group;
ui_manager = GIMP_EDITOR (tree_view)->ui_manager;
group = gimp_ui_manager_get_action_group (ui_manager, "layers");
group = gimp_ui_manager_get_action_group (ui_manager, "layers");
gtk_tree_model_get (tree_view->model, &iter,
layer_view->priv->model_column_mask, &renderer,
-1);
if (renderer)
if (state & GDK_MOD1_MASK)
{
GimpLayerMask *mask = GIMP_LAYER_MASK (renderer->viewable);
const gchar *action = "layers-alpha-selection-replace";
if (gimp_layer_mask_get_edit (mask))
gimp_action_group_set_action_active (group,
"layers-mask-edit", FALSE);
g_object_unref (renderer);
if ((state & GDK_SHIFT_MASK) && (state & GDK_CONTROL_MASK))
{
action = "layers-alpha-selection-intersect";
}
else if (state & GDK_SHIFT_MASK)
{
action = "layers-alpha-selection-add";
}
else if (state & GDK_CONTROL_MASK)
{
action = "layers-alpha-selection-subtract";
}
gimp_action_group_activate_action (group, action);
}
else
{
GimpViewRenderer *renderer;
gtk_tree_model_get (tree_view->model, &iter,
layer_view->priv->model_column_mask, &renderer,
-1);
if (renderer)
{
GimpLayerMask *mask = GIMP_LAYER_MASK (renderer->viewable);
if (gimp_layer_mask_get_edit (mask))
gimp_action_group_set_action_active (group,
"layers-mask-edit", FALSE);
g_object_unref (renderer);
}
}
}

View file

@ -1206,7 +1206,7 @@ gimp_tag_entry_expose (GtkWidget *widget,
const char *display_text;
/* eeeeeek */
if (widget->window == event->window)
if (gtk_widget_get_window (widget) == event->window)
return FALSE;
if (! GIMP_TAG_ENTRY (widget)->description_shown)
@ -1236,7 +1236,7 @@ gimp_tag_entry_expose (GtkWidget *widget,
&layout_width, &layout_height);
offset = (window_height - PANGO_PIXELS (layout_height)) / 2;
gtk_paint_layout (widget->style,
gtk_paint_layout (gtk_widget_get_style (widget),
event->window,
GTK_STATE_INSENSITIVE,
TRUE,

View file

@ -92,6 +92,9 @@ static gboolean gimp_tag_popup_list_event (GtkWidget *widg
static gboolean gimp_tag_popup_is_in_tag (PopupTagData *tag_data,
gint x,
gint y);
static void gimp_tag_popup_queue_draw_tag (GimpTagPopup *widget,
PopupTagData *tag_data);
static void gimp_tag_popup_toggle_tag (GimpTagPopup *popup,
PopupTagData *tag_data);
static void gimp_tag_popup_check_can_toggle (GimpTagged *tagged,
@ -177,6 +180,20 @@ gimp_tag_popup_init (GimpTagPopup *popup)
GDK_POINTER_MOTION_MASK);
gtk_container_add (GTK_CONTAINER (popup->alignment), popup->tag_area);
gtk_widget_show (popup->tag_area);
g_signal_connect (popup->alignment, "expose-event",
G_CALLBACK (gimp_tag_popup_border_expose),
popup);
g_signal_connect (popup, "event",
G_CALLBACK (gimp_tag_popup_border_event),
NULL);
g_signal_connect (popup->tag_area, "expose-event",
G_CALLBACK (gimp_tag_popup_list_expose),
popup);
g_signal_connect (popup->tag_area, "event",
G_CALLBACK (gimp_tag_popup_list_event),
popup);
}
static GObject *
@ -348,19 +365,6 @@ gimp_tag_popup_constructor (GType type,
gtk_window_move (GTK_WINDOW (popup), popup_rect.x, popup_rect.y);
gtk_window_resize (GTK_WINDOW (popup), popup_rect.width, popup_rect.height);
g_signal_connect (popup->alignment, "expose-event",
G_CALLBACK (gimp_tag_popup_border_expose),
popup);
g_signal_connect (popup, "event",
G_CALLBACK (gimp_tag_popup_border_event),
NULL);
g_signal_connect (popup->tag_area, "expose-event",
G_CALLBACK (gimp_tag_popup_list_expose),
popup);
g_signal_connect (popup->tag_area, "event",
G_CALLBACK (gimp_tag_popup_list_event),
popup);
return object;
}
@ -409,8 +413,8 @@ gimp_tag_popup_set_property (GObject *object,
switch (property_id)
{
case PROP_OWNER:
popup->combo_entry = g_value_get_object (value);
g_object_ref (popup->combo_entry);
popup->combo_entry = g_value_dup_object (value);
break;
default:
@ -567,21 +571,23 @@ gimp_tag_popup_border_expose (GtkWidget *widget,
GdkEventExpose *event,
GimpTagPopup *popup)
{
GdkRectangle border;
GdkRectangle upper;
GdkRectangle lower;
gint arrow_space;
gint arrow_size;
if (event->window != widget->window)
GdkWindow *window = gtk_widget_get_window (widget);
GtkStyle *style = gtk_widget_get_style (widget);
GdkRectangle border;
GdkRectangle upper;
GdkRectangle lower;
gint arrow_space;
gint arrow_size;
if (event->window != gtk_widget_get_window (widget))
return FALSE;
get_arrows_visible_area (popup, &border, &upper, &lower, &arrow_space);
arrow_size = 0.7 * arrow_space;
gtk_paint_box (widget->style,
widget->window,
gtk_paint_box (style, window,
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
&event->area, widget, "menu",
@ -591,8 +597,7 @@ gimp_tag_popup_border_expose (GtkWidget *widget,
{
/* upper arrow */
gtk_paint_box (widget->style,
widget->window,
gtk_paint_box (style, window,
popup->upper_arrow_state,
GTK_SHADOW_OUT,
&event->area, widget, "menu",
@ -601,21 +606,19 @@ gimp_tag_popup_border_expose (GtkWidget *widget,
upper.width,
upper.height);
gtk_paint_arrow (widget->style,
widget->window,
gtk_paint_arrow (style, window,
popup->upper_arrow_state,
GTK_SHADOW_OUT,
&event->area, widget, "menu_scroll_arrow_up",
GTK_ARROW_UP,
TRUE,
upper.x + (upper.width - arrow_size) / 2,
upper.y + widget->style->ythickness + (arrow_space - arrow_size) / 2,
upper.y + style->ythickness + (arrow_space - arrow_size) / 2,
arrow_size, arrow_size);
/* lower arrow */
gtk_paint_box (widget->style,
widget->window,
gtk_paint_box (style, window,
popup->lower_arrow_state,
GTK_SHADOW_OUT,
&event->area, widget, "menu",
@ -624,15 +627,14 @@ gimp_tag_popup_border_expose (GtkWidget *widget,
lower.width,
lower.height);
gtk_paint_arrow (widget->style,
widget->window,
gtk_paint_arrow (style, window,
popup->lower_arrow_state,
GTK_SHADOW_OUT,
&event->area, widget, "menu_scroll_arrow_down",
GTK_ARROW_DOWN,
TRUE,
lower.x + (lower.width - arrow_size) / 2,
lower.y + widget->style->ythickness + (arrow_space - arrow_size) / 2,
lower.y + style->ythickness + (arrow_space - arrow_size) / 2,
arrow_size, arrow_size);
}
@ -651,15 +653,15 @@ gimp_tag_popup_border_event (GtkWidget *widget,
gint x;
gint y;
if (button_event->window == widget->window &&
if (button_event->window == gtk_widget_get_window (widget) &&
gimp_tag_popup_button_scroll (popup, button_event))
{
return TRUE;
}
gdk_window_get_pointer (widget->window, &x, &y, NULL);
gdk_window_get_pointer (gtk_widget_get_window (widget), &x, &y, NULL);
if (button_event->window != popup->tag_area->window &&
if (button_event->window != gtk_widget_get_window (popup->tag_area) &&
(x < widget->allocation.y ||
y < widget->allocation.x ||
x > widget->allocation.x + widget->allocation.width ||
@ -678,14 +680,13 @@ gimp_tag_popup_border_event (GtkWidget *widget,
{
GdkEventMotion *motion_event = (GdkEventMotion *) event;
if (motion_event->window == widget->window)
{
gint x = motion_event->x + widget->allocation.x;
gint y = motion_event->y + widget->allocation.y;
gint x, y;
gimp_tag_popup_handle_scrolling (popup, x, y,
popup->scroll_timeout_id == 0, TRUE);
}
gdk_window_get_pointer (gtk_widget_get_window (widget), &x, &y, NULL);
gimp_tag_popup_handle_scrolling (popup, x, y,
motion_event->window == widget->window,
TRUE);
}
else if (event->type == GDK_BUTTON_RELEASE)
{
@ -693,7 +694,7 @@ gimp_tag_popup_border_event (GtkWidget *widget,
popup->single_select_disabled = TRUE;
if (button_event->window == widget->window &&
if (button_event->window == gtk_widget_get_window (widget) &&
gimp_tag_popup_button_scroll (popup, button_event))
{
return TRUE;
@ -880,6 +881,9 @@ gimp_tag_popup_list_event (GtkWidget *widget,
else if (event->type == GDK_MOTION_NOTIFY)
{
GdkEventMotion *motion_event = (GdkEventMotion *) event;
PopupTagData *prelight = NULL;
gint x;
gint y;
gint i;
@ -893,15 +897,21 @@ gimp_tag_popup_list_event (GtkWidget *widget,
if (gimp_tag_popup_is_in_tag (tag_data, x, y))
{
if (popup->prelight != tag_data)
{
popup->prelight = tag_data;
gtk_widget_queue_draw (widget);
}
prelight = tag_data;
break;
}
}
if (prelight != popup->prelight)
{
if (popup->prelight)
gimp_tag_popup_queue_draw_tag (popup, popup->prelight);
popup->prelight = prelight;
if (popup->prelight)
gimp_tag_popup_queue_draw_tag (popup, popup->prelight);
}
}
else if (event->type == GDK_BUTTON_RELEASE &&
! popup->single_select_disabled)
@ -948,6 +958,17 @@ gimp_tag_popup_is_in_tag (PopupTagData *tag_data,
return FALSE;
}
static void
gimp_tag_popup_queue_draw_tag (GimpTagPopup *popup,
PopupTagData *tag_data)
{
gtk_widget_queue_draw_area (popup->tag_area,
tag_data->bounds.x,
tag_data->bounds.y - popup->scroll_y,
tag_data->bounds.width,
tag_data->bounds.height);
}
static void
gimp_tag_popup_toggle_tag (GimpTagPopup *popup,
PopupTagData *tag_data)
@ -1180,6 +1201,7 @@ gimp_tag_popup_scroll_by (GimpTagPopup *popup,
{
arrow_state = (popup->upper_arrow_prelight ?
GTK_STATE_PRELIGHT : GTK_STATE_NORMAL);
}
if (arrow_state != popup->upper_arrow_state)
@ -1215,7 +1237,7 @@ gimp_tag_popup_scroll_by (GimpTagPopup *popup,
{
popup->scroll_y = new_scroll_y;
gdk_window_scroll (popup->tag_area->window, 0, -step);
gdk_window_scroll (gtk_widget_get_window (popup->tag_area), 0, -step);
}
}
@ -1330,7 +1352,7 @@ gimp_tag_popup_handle_scrolling (GimpTagPopup *popup,
{
popup->upper_arrow_state = arrow_state;
gdk_window_invalidate_rect (GTK_WIDGET (popup)->window,
gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET (popup)),
&rect, FALSE);
}
}
@ -1431,7 +1453,7 @@ gimp_tag_popup_handle_scrolling (GimpTagPopup *popup,
{
popup->lower_arrow_state = arrow_state;
gdk_window_invalidate_rect (GTK_WIDGET (popup)->window,
gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET (popup)),
&rect, FALSE);
}
}

View file

@ -38,9 +38,11 @@
#include "vectors/gimpvectors-export.h"
#include "vectors/gimpvectors-import.h"
#include "gimpactiongroup.h"
#include "gimpcontainerview.h"
#include "gimpvectorstreeview.h"
#include "gimpdnd.h"
#include "gimpuimanager.h"
#include "gimpvectorstreeview.h"
#include "gimpwidgets-utils.h"
#include "gimp-intl.h"
@ -48,20 +50,24 @@
static void gimp_vectors_tree_view_view_iface_init (GimpContainerViewInterface *iface);
static GObject * gimp_vectors_tree_view_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_vectors_tree_view_set_container (GimpContainerView *view,
GimpContainer *container);
static void gimp_vectors_tree_view_drop_svg (GimpContainerTreeView *tree_view,
const gchar *svg_data,
gsize svg_data_len,
GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos);
static GimpItem * gimp_vectors_tree_view_item_new (GimpImage *image);
static guchar * gimp_vectors_tree_view_drag_svg (GtkWidget *widget,
gsize *svg_data_len,
gpointer data);
static GObject * gimp_vectors_tree_view_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_vectors_tree_view_set_container (GimpContainerView *view,
GimpContainer *container);
static void gimp_vectors_tree_view_drop_svg (GimpContainerTreeView *tree_view,
const gchar *svg_data,
gsize svg_data_len,
GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos);
static GimpItem * gimp_vectors_tree_view_item_new (GimpImage *image);
static void gimp_vectors_tree_view_vectors_clicked (GimpCellRendererViewable *cell,
const gchar *path_str,
GdkModifierType state,
GimpContainerTreeView *tree_view);
static guchar * gimp_vectors_tree_view_drag_svg (GtkWidget *widget,
gsize *svg_data_len,
gpointer data);
G_DEFINE_TYPE_WITH_CODE (GimpVectorsTreeView, gimp_vectors_tree_view,
@ -139,6 +145,10 @@ gimp_vectors_tree_view_constructor (GType type,
tree_view = GIMP_CONTAINER_TREE_VIEW (object);
view = GIMP_VECTORS_TREE_VIEW (object);
g_signal_connect (tree_view->renderer_cell, "clicked",
G_CALLBACK (gimp_vectors_tree_view_vectors_clicked),
view);
/* hide basically useless edit button */
gtk_widget_hide (gimp_item_tree_view_get_edit_button (GIMP_ITEM_TREE_VIEW (view)));
@ -258,6 +268,37 @@ gimp_vectors_tree_view_item_new (GimpImage *image)
return GIMP_ITEM (new_vectors);
}
static void
gimp_vectors_tree_view_vectors_clicked (GimpCellRendererViewable *cell,
const gchar *path_str,
GdkModifierType state,
GimpContainerTreeView *tree_view)
{
if (state & GDK_MOD1_MASK)
{
GimpUIManager *ui_manager = GIMP_EDITOR (tree_view)->ui_manager;
GimpActionGroup *group;
const gchar *action = "vectors-selection-replace";
group = gimp_ui_manager_get_action_group (ui_manager, "vectors");
if ((state & GDK_SHIFT_MASK) && (state & GDK_CONTROL_MASK))
{
action = "vectors-selection-intersect";
}
else if (state & GDK_SHIFT_MASK)
{
action = "vectors-selection-add";
}
else if (state & GDK_CONTROL_MASK)
{
action = "vectors-selection-subtract";
}
gimp_action_group_activate_action (group, action);
}
}
static guchar *
gimp_vectors_tree_view_drag_svg (GtkWidget *widget,
gsize *svg_data_len,

View file

@ -17,7 +17,7 @@ DISTCLEANFILES = $(tagsdata_data_files)
gimp-tags-default.xml: gimp-tags-default.xml.in $(wildcard $(top_srcdir)/po-tags/*.po)
$(INTLTOOL_MERGE) $(top_srcdir)/po $< $(@) -x -u -c $(top_builddir)/po/.intltool-merge-cache
$(INTLTOOL_MERGE) $(top_srcdir)/po-tags $< $(@) -x -u -c $(top_builddir)/po-tags/.intltool-merge-cache
validate: gimp-tags-default.xml

View file

@ -26,60 +26,144 @@
</resource>
<resource identifier="brushes/Circle-1.vbr" checksum="5686e2c8f5eba4d85d99a72fa620ce1a">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-3.vbr" checksum="541e33b7cbfa87adac1e275e825da4bd">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-5.vbr" checksum="c3016808d65cdca04df573bd92d92fe8">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-7.vbr" checksum="24f071640eef492687b9dd9e45fd3e80">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-9.vbr" checksum="a5d94d82235668de98b9b8e573c8e86d">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-11.vbr" checksum="4744b701c428037318158da542d41bc2">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-13.vbr" checksum="4b8e68d6c73c96151ab0c4e5ac247418">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-15.vbr" checksum="893c52e9ae77b5b3d28492e1ef1e1fbe">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-17.vbr" checksum="2346bd647b77772bc65c199cb5e360d1">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-19.vbr" checksum="27c917943dcdf447bad3c202feb71daf">
<tag>
<_thetag>circle</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-3.vbr" checksum="13590692b064cefd63d7ffa942db71c2">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-5.vbr" checksum="13be0ea0729c907910dcbaa5ad39602e">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-7.vbr" checksum="ca4f200f2a8c1d44d4d3b57fb9b6295e">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-9.vbr" checksum="3a9bd089c56837da1b58334ff4cde18b">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-11.vbr" checksum="aa580aceb667a49f385adac5b0a049b5">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-13.vbr" checksum="742dc4898e54d3ce9a24bd373cd02d4e">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-15.vbr" checksum="8a72451f9aa3cfacb088421521e3375a">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-17.vbr" checksum="5243c6abe22500194660e0bf5af6dae5">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/Circle-Fuzzy-19.vbr" checksum="e4e5ccda277d40a794dc58b2a15e5136">
<tag>
<_thetag>circle</_thetag>
</tag>
<tag>
<_thetag>fuzzy</_thetag>
</tag>
</resource>
<resource identifier="brushes/confetti.gbr" checksum="ba5a4759cb321b81e232bba3f33dce76">

View file

@ -79,13 +79,15 @@ gimp_color_scale_init (GimpColorScale *scale)
GTK_SCALE (scale)->draw_value = FALSE;
range->slider_size_fixed = TRUE;
range->orientation = GTK_ORIENTATION_HORIZONTAL;
range->flippable = TRUE;
/* range->update_policy = GTK_UPDATE_DELAYED; */
scale->channel = GIMP_COLOR_SELECTOR_VALUE;
scale->needs_render = TRUE;
gtk_orientable_set_orientation (GTK_ORIENTABLE (range),
GTK_ORIENTATION_HORIZONTAL);
gimp_rgba_set (&scale->rgb, 0.0, 0.0, 0.0, 1.0);
gimp_rgb_to_hsv (&scale->rgb, &scale->hsv);
}
@ -142,7 +144,7 @@ gimp_color_scale_size_allocate (GtkWidget *widget,
scale_width = range->range_rect.width - 2 * (focus + trough_border);
scale_height = range->range_rect.height - 2 * (focus + trough_border);
switch (range->orientation)
switch (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)))
{
case GTK_ORIENTATION_HORIZONTAL:
scale_width -= range->min_slider_size - 1;
@ -311,7 +313,7 @@ gimp_color_scale_expose (GtkWidget *widget,
gdk_gc_set_clip_rectangle (style->black_gc, &area);
switch (range->orientation)
switch (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)))
{
case GTK_ORIENTATION_HORIZONTAL:
gdk_draw_rgb_image_dithalign (window,
@ -351,7 +353,7 @@ gimp_color_scale_expose (GtkWidget *widget,
range->range_rect.width,
range->range_rect.height);
switch (range->orientation)
switch (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)))
{
case GTK_ORIENTATION_HORIZONTAL:
area.x = widget->allocation.x + range->slider_start;
@ -377,7 +379,8 @@ gimp_color_scale_expose (GtkWidget *widget,
style->dark_gc[GTK_STATE_INSENSITIVE]);
gdk_gc_set_clip_rectangle (gc, &expose_area);
switch (range->orientation)
switch (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)))
{
case GTK_ORIENTATION_HORIZONTAL:
for (w = area.width, x = area.x, y = area.y;
@ -390,6 +393,7 @@ gimp_color_scale_expose (GtkWidget *widget,
gdk_draw_line (window, gc, x, y, x, y + h - 1);
break;
}
gdk_gc_set_clip_rectangle (gc, NULL);
gc = (GTK_WIDGET_IS_SENSITIVE (widget) ?
@ -397,7 +401,8 @@ gimp_color_scale_expose (GtkWidget *widget,
style->light_gc[GTK_STATE_INSENSITIVE]);
gdk_gc_set_clip_rectangle (gc, &expose_area);
switch (range->orientation)
switch (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)))
{
case GTK_ORIENTATION_HORIZONTAL:
for (w = area.width, x = area.x, y = area.y + area.height - 1;
@ -410,6 +415,7 @@ gimp_color_scale_expose (GtkWidget *widget,
gdk_draw_line (window, gc, x, y, x, y + h - 1);
break;
}
gdk_gc_set_clip_rectangle (gc, NULL);
}
@ -429,16 +435,13 @@ GtkWidget *
gimp_color_scale_new (GtkOrientation orientation,
GimpColorSelectorChannel channel)
{
GimpColorScale *scale;
GtkRange *range;
scale = g_object_new (GIMP_TYPE_COLOR_SCALE, NULL);
GimpColorScale *scale = g_object_new (GIMP_TYPE_COLOR_SCALE,
"orientation", orientation,
NULL);
scale->channel = channel;
range = GTK_RANGE (scale);
range->orientation = orientation;
range->flippable = (orientation == GTK_ORIENTATION_HORIZONTAL);
GTK_RANGE (scale)->flippable = (orientation == GTK_ORIENTATION_HORIZONTAL);
return GTK_WIDGET (scale);
}
@ -493,7 +496,8 @@ gimp_color_scale_set_color (GimpColorScale *scale,
static gboolean
should_invert (GtkRange *range)
{
if (range->orientation == GTK_ORIENTATION_HORIZONTAL)
if (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)) ==
GTK_ORIENTATION_HORIZONTAL)
return
(range->inverted && !range->flippable) ||
(range->inverted && range->flippable &&
@ -555,7 +559,7 @@ gimp_color_scale_render (GimpColorScale *scale)
invert = should_invert (range);
switch (range->orientation)
switch (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)))
{
case GTK_ORIENTATION_HORIZONTAL:
for (x = 0, d = buf; x < scale->width; x++, d += 3)
@ -625,7 +629,7 @@ gimp_color_scale_render_alpha (GimpColorScale *scale)
buf = scale->buf;
rgb = scale->rgb;
switch (range->orientation)
switch (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)))
{
case GTK_ORIENTATION_HORIZONTAL:
{

View file

@ -606,7 +606,8 @@ gimp_unit_menu_create_selection (GimpUnitMenu *menu)
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (menu->selection)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (menu->selection))),
vbox);
gtk_widget_show (vbox);
/* the selection list */

View file

@ -5,10 +5,10 @@
* Copyright (C) 2008 Fredrik Alstromer <roe@excu.se>
* Copyright (C) 2008 Martin Nordholts <martinn@svn.gnome.org>
*
* This library is free software; you can redistribute it and/or
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -16,9 +16,8 @@
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
/* A small regression test case for the evaluator */

View file

@ -675,8 +675,8 @@ color_rotate_dialog (void)
/* H-Box */
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (hbox), previews, TRUE, TRUE, 0);

View file

@ -407,7 +407,8 @@ alienmap2_dialog (void)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_zoom_preview_new (drawable);

View file

@ -416,8 +416,8 @@ align_layers_dialog (void)
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table, FALSE, FALSE, 0);
gtk_widget_show (table);
combo = gimp_int_combo_box_new (_("None"), H_NONE,

View file

@ -1277,7 +1277,8 @@ struc_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -237,7 +237,8 @@ blinds_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_aspect_preview_new (drawable, NULL);

View file

@ -246,7 +246,8 @@ sel_gauss_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -492,7 +492,8 @@ gauss_dialog (gint32 image_ID,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -1026,7 +1026,8 @@ mblur_dialog (gint32 image_ID,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -365,7 +365,8 @@ borderaverage_dialog (gint32 image_ID,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
frame = gimp_frame_new (_("Border Size"));

View file

@ -780,7 +780,8 @@ bumpmap_dialog (void)
paned = gtk_hpaned_new ();
gtk_container_set_border_width (GTK_CONTAINER (paned), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), paned);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
paned);
gtk_widget_show (paned);
hbox = gtk_hbox_new (FALSE, 0);

View file

@ -825,7 +825,8 @@ cartoon_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -506,7 +506,8 @@ cm_dialog (CmParamsType *mix,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_zoom_preview_new (drawable);

View file

@ -360,7 +360,8 @@ checkerboard_dialog (gint32 image_ID,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
gtk_widget_show (vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -1193,8 +1193,8 @@ CML_explorer_dialog (void)
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
vbox = gtk_vbox_new (FALSE, 12);
@ -1826,8 +1826,8 @@ function_graph_new (GtkWidget *widget,
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame,
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
preview = gtk_drawing_area_new ();

View file

@ -364,8 +364,8 @@ doDialog (void)
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, TRUE, TRUE, 0);
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);

View file

@ -302,7 +302,8 @@ exchange_dialog (GimpDrawable *drawable)
/* do some boxes here */
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
frame = gimp_frame_new (_("Middle-Click Inside Preview to Pick \"From Color\""));

View file

@ -391,7 +391,8 @@ color_to_alpha_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -269,7 +269,8 @@ colorify_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_zoom_preview_new (drawable);

View file

@ -612,7 +612,8 @@ remap_dialog (gint32 image_ID,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox);
cmap = gimp_image_get_colormap (image_ID, &ncols);

View file

@ -1506,7 +1506,8 @@ compose_dialog (const gchar *compose_type,
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
/* Compose type combo */

View file

@ -300,7 +300,8 @@ retinex_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_zoom_preview_new (drawable);

View file

@ -922,7 +922,8 @@ convolve_image_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -282,7 +282,8 @@ cubism_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, &cvals.preview);

View file

@ -1240,7 +1240,8 @@ bender_new_dialog (GimpDrawable *drawable)
/* The main hbox */
main_hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (cd->shell)->vbox), main_hbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (cd->shell))),
main_hbox);
gtk_widget_show (main_hbox);
/* Left side column */

View file

@ -1495,8 +1495,8 @@ decompose_dialog (void)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), main_vbox,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
frame = gimp_frame_new (_("Extract Channels"));

View file

@ -336,7 +336,8 @@ deinterlace_dialog (GimpDrawable *drawable)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

View file

@ -659,7 +659,7 @@ DepthMerge_dialog (DepthMerge *dm)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);

View file

@ -439,7 +439,8 @@ despeckle_dialog (void)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
main_vbox);
gtk_widget_show (main_vbox);
preview = gimp_drawable_preview_new (drawable, NULL);

Some files were not shown because too many files have changed in this diff Show more