mirror of https://github.com/GNOME/gimp.git
app/actions/dockable-actions.c app/actions/dockable-commands.[ch]
2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
This commit is contained in:
parent
17375e3b09
commit
5236dc6f13
48
ChangeLog
48
ChangeLog
|
@ -1,8 +1,54 @@
|
|||
2006-01-17 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/actions/dockable-actions.c
|
||||
* app/actions/dockable-commands.[ch]
|
||||
* app/dialogs/dialogs-constructors.[ch]
|
||||
* app/dialogs/dialogs.c
|
||||
* app/display/gimpdisplayshell-layer-select.c
|
||||
* app/widgets/gimpbrusheditor.[ch]
|
||||
* app/widgets/gimpbrushfactoryview.h
|
||||
* app/widgets/gimpbufferview.[ch]
|
||||
* app/widgets/gimpchanneltreeview.c
|
||||
* app/widgets/gimpcomponenteditor.[ch]
|
||||
* app/widgets/gimpcontainerbox.c
|
||||
* app/widgets/gimpcontainercombobox.[ch]
|
||||
* app/widgets/gimpcontainereditor.[ch]
|
||||
* app/widgets/gimpcontainerentry.[ch]
|
||||
* app/widgets/gimpcontainergridview.[ch]
|
||||
* app/widgets/gimpcontainerpopup.[ch]
|
||||
* app/widgets/gimpcontainertreeview.[ch]
|
||||
* app/widgets/gimpcontainerview.[ch]
|
||||
* app/widgets/gimpdatafactoryview.[ch]
|
||||
* app/widgets/gimpdevicestatus.c
|
||||
* app/widgets/gimpdialogfactory.[ch]
|
||||
* app/widgets/gimpdocumentview.[ch]
|
||||
* app/widgets/gimpfontview.[ch]
|
||||
* app/widgets/gimpgradienteditor.[ch]
|
||||
* app/widgets/gimpimageview.[ch]
|
||||
* app/widgets/gimpitemtreeview.[ch]
|
||||
* app/widgets/gimplayertreeview.c
|
||||
* app/widgets/gimpmenudock.c
|
||||
* app/widgets/gimppatternfactoryview.[ch]
|
||||
* app/widgets/gimppropwidgets.[ch]
|
||||
* app/widgets/gimpselectioneditor.[ch]
|
||||
* app/widgets/gimpsessioninfo.[ch]
|
||||
* app/widgets/gimptemplateview.[ch]
|
||||
* app/widgets/gimptooloptionseditor.c
|
||||
* app/widgets/gimptoolview.[ch]
|
||||
* app/widgets/gimpundoeditor.[ch]
|
||||
* app/widgets/gimpviewablebox.c
|
||||
* app/widgets/gimpviewablebutton.[ch]
|
||||
* app/widgets/gimpviewabledialog.[ch]
|
||||
* app/widgets/gimpviewrenderer.c: change the word "preview" to
|
||||
"view" whereever we talk about GimpView or GimpViewRenderer
|
||||
objects or their sizes. Ther were renamed from "Preview" a long
|
||||
time ago and we had a preview/view naming mess ever since.
|
||||
|
||||
2006-01-14 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/config/gimpconfig-utils.[ch] (gimp_config_connect_full):
|
||||
variant of gimp_config_connect() which allows the connected
|
||||
objects to have different propertynames.
|
||||
objects to have different property names.
|
||||
|
||||
* app/widgets/widgets-enums.[ch]: removed enum GimpViewType...
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ static GimpActionEntry dockable_actions[] =
|
|||
GIMP_HELP_DOCK_TAB_DETACH }
|
||||
};
|
||||
|
||||
#define PREVIEW_SIZE(action,label,size) \
|
||||
#define VIEW_SIZE(action,label,size) \
|
||||
{ "dockable-preview-size-" action, NULL, \
|
||||
(label), NULL, NULL, \
|
||||
(size), \
|
||||
|
@ -76,17 +76,17 @@ static GimpActionEntry dockable_actions[] =
|
|||
(style), \
|
||||
GIMP_HELP_DOCK_TAB_STYLE }
|
||||
|
||||
static GimpRadioActionEntry dockable_preview_size_actions[] =
|
||||
static GimpRadioActionEntry dockable_view_size_actions[] =
|
||||
{
|
||||
PREVIEW_SIZE ("tiny", N_("_Tiny"), GIMP_VIEW_SIZE_TINY),
|
||||
PREVIEW_SIZE ("extra-small", N_("E_xtra Small"), GIMP_VIEW_SIZE_EXTRA_SMALL),
|
||||
PREVIEW_SIZE ("small", N_("_Small"), GIMP_VIEW_SIZE_SMALL),
|
||||
PREVIEW_SIZE ("medium", N_("_Medium"), GIMP_VIEW_SIZE_MEDIUM),
|
||||
PREVIEW_SIZE ("large", N_("_Large"), GIMP_VIEW_SIZE_LARGE),
|
||||
PREVIEW_SIZE ("extra-large", N_("Ex_tra Large"), GIMP_VIEW_SIZE_EXTRA_LARGE),
|
||||
PREVIEW_SIZE ("huge", N_("_Huge"), GIMP_VIEW_SIZE_HUGE),
|
||||
PREVIEW_SIZE ("enormous", N_("_Enormous"), GIMP_VIEW_SIZE_ENORMOUS),
|
||||
PREVIEW_SIZE ("gigantic", N_("_Gigantic"), GIMP_VIEW_SIZE_GIGANTIC)
|
||||
VIEW_SIZE ("tiny", N_("_Tiny"), GIMP_VIEW_SIZE_TINY),
|
||||
VIEW_SIZE ("extra-small", N_("E_xtra Small"), GIMP_VIEW_SIZE_EXTRA_SMALL),
|
||||
VIEW_SIZE ("small", N_("_Small"), GIMP_VIEW_SIZE_SMALL),
|
||||
VIEW_SIZE ("medium", N_("_Medium"), GIMP_VIEW_SIZE_MEDIUM),
|
||||
VIEW_SIZE ("large", N_("_Large"), GIMP_VIEW_SIZE_LARGE),
|
||||
VIEW_SIZE ("extra-large", N_("Ex_tra Large"), GIMP_VIEW_SIZE_EXTRA_LARGE),
|
||||
VIEW_SIZE ("huge", N_("_Huge"), GIMP_VIEW_SIZE_HUGE),
|
||||
VIEW_SIZE ("enormous", N_("_Enormous"), GIMP_VIEW_SIZE_ENORMOUS),
|
||||
VIEW_SIZE ("gigantic", N_("_Gigantic"), GIMP_VIEW_SIZE_GIGANTIC)
|
||||
};
|
||||
|
||||
static GimpRadioActionEntry dockable_tab_style_actions[] =
|
||||
|
@ -98,7 +98,7 @@ static GimpRadioActionEntry dockable_tab_style_actions[] =
|
|||
TAB_STYLE ("preview-name", N_("St_atus & Text"), GIMP_TAB_STYLE_PREVIEW_NAME)
|
||||
};
|
||||
|
||||
#undef PREVIEW_SIZE
|
||||
#undef VIEW_SIZE
|
||||
#undef TAB_STYLE
|
||||
|
||||
|
||||
|
@ -142,11 +142,11 @@ dockable_actions_setup (GimpActionGroup *group)
|
|||
G_CALLBACK (dockable_add_tab_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
dockable_preview_size_actions,
|
||||
G_N_ELEMENTS (dockable_preview_size_actions),
|
||||
dockable_view_size_actions,
|
||||
G_N_ELEMENTS (dockable_view_size_actions),
|
||||
NULL,
|
||||
GIMP_VIEW_SIZE_MEDIUM,
|
||||
G_CALLBACK (dockable_preview_size_cmd_callback));
|
||||
G_CALLBACK (dockable_view_size_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
dockable_tab_style_actions,
|
||||
|
@ -175,7 +175,7 @@ dockable_actions_update (GimpActionGroup *group,
|
|||
GimpViewType view_type = -1;
|
||||
gboolean list_view_available = FALSE;
|
||||
gboolean grid_view_available = FALSE;
|
||||
GimpViewSize preview_size = -1;
|
||||
GimpViewSize view_size = -1;
|
||||
GimpTabStyle tab_style = -1;
|
||||
gint n_pages = 0;
|
||||
gint n_books = 0;
|
||||
|
@ -236,7 +236,7 @@ dockable_actions_update (GimpActionGroup *group,
|
|||
view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (view)
|
||||
preview_size = gimp_container_view_get_preview_size (view, NULL);
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
tab_style = dockable->tab_style;
|
||||
|
||||
|
@ -252,43 +252,43 @@ dockable_actions_update (GimpActionGroup *group,
|
|||
|
||||
SET_SENSITIVE ("dockable-detach-tab", n_pages > 1 || n_books > 1);
|
||||
|
||||
SET_VISIBLE ("dockable-preview-size-menu", preview_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-menu", view_size != -1);
|
||||
|
||||
if (preview_size != -1)
|
||||
if (view_size != -1)
|
||||
{
|
||||
if (preview_size >= GIMP_VIEW_SIZE_GIGANTIC)
|
||||
if (view_size >= GIMP_VIEW_SIZE_GIGANTIC)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-gigantic", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_ENORMOUS)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_ENORMOUS)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-enormous", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_HUGE)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_HUGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-huge", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_EXTRA_LARGE)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_EXTRA_LARGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-extra-large", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_LARGE)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_LARGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-large", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_MEDIUM)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_MEDIUM)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-medium", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_SMALL)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_SMALL)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-small", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_EXTRA_SMALL)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_EXTRA_SMALL)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-extra-small", TRUE);
|
||||
}
|
||||
else if (preview_size >= GIMP_VIEW_SIZE_TINY)
|
||||
else if (view_size >= GIMP_VIEW_SIZE_TINY)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-tiny", TRUE);
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
|
|||
{
|
||||
GimpContainerView *old_view;
|
||||
GtkWidget *new_dockable;
|
||||
gint preview_size = -1;
|
||||
gint view_size = -1;
|
||||
|
||||
if (view_type == GIMP_VIEW_TYPE_LIST)
|
||||
memcpy (substring, "list", 4);
|
||||
|
@ -170,15 +170,14 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
|
|||
old_view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (old_view)
|
||||
preview_size = gimp_container_view_get_preview_size (old_view,
|
||||
NULL);
|
||||
view_size = gimp_container_view_get_view_size (old_view, NULL);
|
||||
|
||||
|
||||
new_dockable =
|
||||
gimp_dialog_factory_dockable_new (dockbook->dock->dialog_factory,
|
||||
dockbook->dock,
|
||||
identifier,
|
||||
preview_size);
|
||||
view_size);
|
||||
|
||||
if (new_dockable)
|
||||
{
|
||||
|
@ -212,16 +211,16 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
dockable_preview_size_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
dockable_view_size_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint page_num;
|
||||
|
||||
preview_size = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
view_size = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
|
@ -237,12 +236,10 @@ dockable_preview_size_cmd_callback (GtkAction *action,
|
|||
gint old_size;
|
||||
gint border_width;
|
||||
|
||||
old_size = gimp_container_view_get_preview_size (view,
|
||||
&border_width);
|
||||
old_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
if (old_size != preview_size)
|
||||
gimp_container_view_set_preview_size (view, preview_size,
|
||||
border_width);
|
||||
if (old_size != view_size)
|
||||
gimp_container_view_set_view_size (view, view_size, border_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ void dockable_detach_tab_cmd_callback (GtkAction *action,
|
|||
void dockable_toggle_view_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void dockable_preview_size_cmd_callback (GtkAction *action,
|
||||
void dockable_view_size_cmd_callback (GtkAction *action,
|
||||
GtkAction *current,
|
||||
gpointer data);
|
||||
void dockable_tab_style_cmd_callback (GtkAction *action,
|
||||
|
|
|
@ -98,7 +98,7 @@ static void dialogs_indexed_palette_selected (GimpColormapEditor *editor,
|
|||
GtkWidget *
|
||||
dialogs_image_new_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return image_new_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ dialogs_image_new_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_file_open_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return file_open_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ dialogs_file_open_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_file_open_location_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return file_open_location_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ dialogs_file_open_location_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_file_save_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return file_save_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ dialogs_file_save_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_preferences_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return preferences_dialog_create (context->gimp);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ dialogs_preferences_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_keyboard_shortcuts_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return keyboard_shortcuts_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ dialogs_keyboard_shortcuts_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_module_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return module_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ dialogs_module_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_tips_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return tips_dialog_create (context->gimp);
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ dialogs_tips_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_about_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return about_dialog_create (context);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ dialogs_about_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_error_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_error_dialog_new (_("GIMP Message"));
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ dialogs_error_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_close_all_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return close_all_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ dialogs_close_all_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_quit_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return quit_dialog_new (context->gimp);
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ dialogs_quit_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_toolbox_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
/* we pass "global_dock_factory", _not_ "global_toolbox_factory" to
|
||||
* the toolbox constructor, because the global_toolbox_factory has no
|
||||
|
@ -211,7 +211,7 @@ dialogs_toolbox_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_dock_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_menu_dock_new (factory,
|
||||
context->gimp->images,
|
||||
|
@ -229,12 +229,12 @@ GtkWidget *
|
|||
dialogs_dockable_constructor (GimpDialogFactory *factory,
|
||||
GimpDialogFactoryEntry *entry,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
GtkWidget *dockable = NULL;
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = entry->new_func (factory, context, preview_size);
|
||||
widget = entry->new_func (factory, context, view_size);
|
||||
|
||||
if (widget)
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ dialogs_dockable_constructor (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_tool_options_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_tool_options_editor_new (context->gimp,
|
||||
factory->menu_factory);
|
||||
|
@ -266,7 +266,7 @@ dialogs_tool_options_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_device_status_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_device_status_new (context->gimp);
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ dialogs_device_status_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_error_console_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_error_console_new (context->gimp,
|
||||
factory->menu_factory);
|
||||
|
@ -283,7 +283,7 @@ dialogs_error_console_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_cursor_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_cursor_view_new (factory->menu_factory);
|
||||
}
|
||||
|
@ -294,49 +294,49 @@ dialogs_cursor_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_image_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_image_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->images,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_brush_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->brush_factory,
|
||||
context,
|
||||
TRUE,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->pattern_factory,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->gradient_factory,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory, "<Gradients>",
|
||||
"/gradients-popup",
|
||||
"gradients");
|
||||
|
@ -345,12 +345,12 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->palette_factory,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory, "<Palettes>",
|
||||
"/palettes-popup",
|
||||
"palettes");
|
||||
|
@ -359,60 +359,60 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_font_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_font_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->fonts,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_tool_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_tool_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->tool_info_list,
|
||||
context,
|
||||
preview_size, 0,
|
||||
view_size, 0,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_buffer_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->named_buffers,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_document_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_document_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->documents,
|
||||
context,
|
||||
preview_size, 0,
|
||||
view_size, 0,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_template_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_template_view_new (GIMP_VIEW_TYPE_LIST,
|
||||
context->gimp->templates,
|
||||
context,
|
||||
preview_size, 0,
|
||||
view_size, 0,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
|
@ -422,49 +422,49 @@ dialogs_template_list_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_image_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_image_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->images,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_brush_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->brush_factory,
|
||||
context,
|
||||
TRUE,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->pattern_factory,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->gradient_factory,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory, "<Gradients>",
|
||||
"/gradients-popup",
|
||||
"gradients");
|
||||
|
@ -473,12 +473,12 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->palette_factory,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory, "<Palettes>",
|
||||
"/palettes-popup",
|
||||
"palettes");
|
||||
|
@ -487,60 +487,60 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_font_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_font_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->fonts,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_tool_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_tool_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->tool_info_list,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_buffer_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->named_buffers,
|
||||
context,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_document_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_document_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->documents,
|
||||
context,
|
||||
preview_size, 0,
|
||||
view_size, 0,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_template_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_template_view_new (GIMP_VIEW_TYPE_GRID,
|
||||
context->gimp->templates,
|
||||
context,
|
||||
preview_size, 0,
|
||||
view_size, 0,
|
||||
factory->menu_factory);
|
||||
}
|
||||
|
||||
|
@ -550,13 +550,13 @@ dialogs_template_grid_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
if (preview_size < 1)
|
||||
preview_size = context->gimp->config->layer_preview_size;
|
||||
if (view_size < 1)
|
||||
view_size = context->gimp->config->layer_preview_size;
|
||||
|
||||
return gimp_item_tree_view_new (GIMP_TYPE_LAYER_TREE_VIEW,
|
||||
preview_size, 2,
|
||||
view_size, 2,
|
||||
gimp_context_get_image (context),
|
||||
factory->menu_factory, "<Layers>",
|
||||
"/layers-popup");
|
||||
|
@ -565,13 +565,13 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
if (preview_size < 1)
|
||||
preview_size = context->gimp->config->layer_preview_size;
|
||||
if (view_size < 1)
|
||||
view_size = context->gimp->config->layer_preview_size;
|
||||
|
||||
return gimp_item_tree_view_new (GIMP_TYPE_CHANNEL_TREE_VIEW,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
gimp_context_get_image (context),
|
||||
factory->menu_factory, "<Channels>",
|
||||
"/channels-popup");
|
||||
|
@ -580,13 +580,13 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
if (preview_size < 1)
|
||||
preview_size = context->gimp->config->layer_preview_size;
|
||||
if (view_size < 1)
|
||||
view_size = context->gimp->config->layer_preview_size;
|
||||
|
||||
return gimp_item_tree_view_new (GIMP_TYPE_VECTORS_TREE_VIEW,
|
||||
preview_size, 1,
|
||||
view_size, 1,
|
||||
gimp_context_get_image (context),
|
||||
factory->menu_factory, "<Vectors>",
|
||||
"/vectors-popup");
|
||||
|
@ -595,7 +595,7 @@ dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_colormap_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
GtkWidget *view;
|
||||
|
||||
|
@ -611,7 +611,7 @@ dialogs_colormap_editor_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_histogram_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_histogram_editor_new ();
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ dialogs_histogram_editor_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_selection_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_selection_editor_new (factory->menu_factory);
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ dialogs_selection_editor_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_undo_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_undo_editor_new (context->gimp->config,
|
||||
factory->menu_factory);
|
||||
|
@ -636,7 +636,7 @@ dialogs_undo_editor_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_sample_point_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_sample_point_editor_new (factory->menu_factory);
|
||||
}
|
||||
|
@ -647,7 +647,7 @@ dialogs_sample_point_editor_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_navigation_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_navigation_editor_new (factory->menu_factory);
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ dialogs_navigation_editor_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_color_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_color_editor_new (context);
|
||||
}
|
||||
|
@ -671,7 +671,7 @@ dialogs_color_editor_new (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_brush_editor_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_brush_editor_new (context->gimp,
|
||||
factory->menu_factory);
|
||||
|
@ -680,7 +680,7 @@ dialogs_brush_editor_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_gradient_editor_new (context->gimp,
|
||||
factory->menu_factory);
|
||||
|
@ -689,7 +689,7 @@ dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
|||
GtkWidget *
|
||||
dialogs_palette_editor_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_palette_editor_new (context->gimp,
|
||||
factory->menu_factory);
|
||||
|
|
|
@ -24,50 +24,50 @@
|
|||
|
||||
GtkWidget * dialogs_image_new_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_file_open_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_file_open_location_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_file_save_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_preferences_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_keyboard_shortcuts_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_module_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_tips_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_about_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_error_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_close_all_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_quit_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
|
||||
/* docks */
|
||||
|
||||
GtkWidget * dialogs_toolbox_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_dock_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
|
||||
/* dockables */
|
||||
|
@ -75,128 +75,128 @@ GtkWidget * dialogs_dock_new (GimpDialogFactory *factory,
|
|||
GtkWidget * dialogs_dockable_constructor (GimpDialogFactory *factory,
|
||||
GimpDialogFactoryEntry *entry,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
GtkWidget * dialogs_tool_options_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_device_status_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_error_console_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_cursor_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
GtkWidget * dialogs_image_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_font_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_tool_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_document_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_template_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
GtkWidget * dialogs_image_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_font_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_tool_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_document_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_template_grid_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
GtkWidget * dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_path_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_colormap_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_histogram_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_selection_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_undo_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_sample_point_editor_new(GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
GtkWidget * dialogs_navigation_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
GtkWidget * dialogs_color_editor_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
GtkWidget * dialogs_brush_editor_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_palette_editor_get (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_CONSTRUCTORS_H__ */
|
||||
|
|
|
@ -111,16 +111,16 @@ static const GimpDialogFactoryEntry toplevel_entries[] =
|
|||
};
|
||||
|
||||
#define DOCKABLE(id,name,blurb,stock_id,help_id,\
|
||||
new_func,preview_size,singleton) \
|
||||
new_func,view_size,singleton) \
|
||||
{ id, name, blurb, stock_id, help_id, \
|
||||
new_func, preview_size, singleton, FALSE, FALSE, TRUE }
|
||||
new_func, view_size, singleton, FALSE, FALSE, TRUE }
|
||||
|
||||
#define LISTGRID(id,name,blurb,stock_id,help_id,\
|
||||
preview_size) \
|
||||
view_size) \
|
||||
{ "gimp-"#id"-list", name, blurb, stock_id, help_id, \
|
||||
dialogs_##id##_list_view_new, preview_size, FALSE, FALSE, FALSE, TRUE }, \
|
||||
dialogs_##id##_list_view_new, view_size, FALSE, FALSE, FALSE, TRUE }, \
|
||||
{ "gimp-"#id"-grid", name, blurb, stock_id, help_id, \
|
||||
dialogs_##id##_grid_view_new, preview_size, FALSE, FALSE, FALSE, TRUE }
|
||||
dialogs_##id##_grid_view_new, view_size, FALSE, FALSE, FALSE, TRUE }
|
||||
|
||||
static const GimpDialogFactoryEntry dock_entries[] =
|
||||
{
|
||||
|
@ -264,7 +264,7 @@ dialogs_init (Gimp *gimp,
|
|||
toplevel_entries[i].stock_id,
|
||||
toplevel_entries[i].help_id,
|
||||
toplevel_entries[i].new_func,
|
||||
toplevel_entries[i].preview_size,
|
||||
toplevel_entries[i].view_size,
|
||||
toplevel_entries[i].singleton,
|
||||
toplevel_entries[i].session_managed,
|
||||
toplevel_entries[i].remember_size,
|
||||
|
@ -278,7 +278,7 @@ dialogs_init (Gimp *gimp,
|
|||
dock_entries[i].stock_id,
|
||||
dock_entries[i].help_id,
|
||||
dock_entries[i].new_func,
|
||||
dock_entries[i].preview_size,
|
||||
dock_entries[i].view_size,
|
||||
dock_entries[i].singleton,
|
||||
dock_entries[i].session_managed,
|
||||
dock_entries[i].remember_size,
|
||||
|
|
|
@ -44,7 +44,7 @@ typedef struct _LayerSelect LayerSelect;
|
|||
struct _LayerSelect
|
||||
{
|
||||
GtkWidget *shell;
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
GtkWidget *label;
|
||||
|
||||
GimpImage *gimage;
|
||||
|
@ -56,7 +56,7 @@ struct _LayerSelect
|
|||
|
||||
static LayerSelect * layer_select_new (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
static void layer_select_destroy (LayerSelect *layer_select,
|
||||
guint32 time);
|
||||
static void layer_select_advance (LayerSelect *layer_select,
|
||||
|
@ -104,7 +104,7 @@ gimp_display_shell_layer_select_init (GimpDisplayShell *shell,
|
|||
static LayerSelect *
|
||||
layer_select_new (GimpImage *gimage,
|
||||
GimpLayer *layer,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
LayerSelect *layer_select;
|
||||
GtkWidget *frame1;
|
||||
|
@ -144,18 +144,18 @@ layer_select_new (GimpImage *gimage,
|
|||
gtk_container_add (GTK_CONTAINER (frame2), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The preview */
|
||||
/* The view */
|
||||
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0);
|
||||
gtk_widget_show (alignment);
|
||||
|
||||
layer_select->preview = gimp_view_new_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_LAYER,
|
||||
preview_size, 1, FALSE);
|
||||
gimp_view_set_viewable (GIMP_VIEW (layer_select->preview),
|
||||
layer_select->view = gimp_view_new_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_LAYER,
|
||||
view_size, 1, FALSE);
|
||||
gimp_view_set_viewable (GIMP_VIEW (layer_select->view),
|
||||
GIMP_VIEWABLE (layer));
|
||||
gtk_container_add (GTK_CONTAINER (alignment), layer_select->preview);
|
||||
gtk_widget_show (layer_select->preview);
|
||||
gtk_container_add (GTK_CONTAINER (alignment), layer_select->view);
|
||||
gtk_widget_show (layer_select->view);
|
||||
gtk_widget_show (alignment);
|
||||
|
||||
/* the layer name label */
|
||||
|
@ -221,7 +221,7 @@ layer_select_advance (LayerSelect *layer_select,
|
|||
|
||||
if (current_layer)
|
||||
{
|
||||
gimp_view_set_viewable (GIMP_VIEW (layer_select->preview),
|
||||
gimp_view_set_viewable (GIMP_VIEW (layer_select->view),
|
||||
GIMP_VIEWABLE (current_layer));
|
||||
gtk_label_set_text (GTK_LABEL (layer_select->label),
|
||||
GIMP_OBJECT (current_layer)->name);
|
||||
|
|
|
@ -83,16 +83,16 @@ gimp_brush_editor_init (GimpBrushEditor *editor)
|
|||
gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
editor->preview = gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_BRUSH,
|
||||
BRUSH_VIEW_WIDTH,
|
||||
BRUSH_VIEW_HEIGHT, 0,
|
||||
FALSE, FALSE, TRUE);
|
||||
gtk_widget_set_size_request (editor->preview,
|
||||
editor->view = gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_BRUSH,
|
||||
BRUSH_VIEW_WIDTH,
|
||||
BRUSH_VIEW_HEIGHT, 0,
|
||||
FALSE, FALSE, TRUE);
|
||||
gtk_widget_set_size_request (editor->view,
|
||||
BRUSH_VIEW_WIDTH, BRUSH_VIEW_HEIGHT);
|
||||
gimp_view_set_expand (GIMP_VIEW (editor->preview), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (frame), editor->preview);
|
||||
gtk_widget_show (editor->preview);
|
||||
gimp_view_set_expand (GIMP_VIEW (editor->view), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (frame), editor->view);
|
||||
gtk_widget_show (editor->view);
|
||||
|
||||
editor->shape_group = NULL;
|
||||
|
||||
|
@ -223,7 +223,7 @@ gimp_brush_editor_set_data (GimpDataEditor *editor,
|
|||
G_CALLBACK (gimp_brush_editor_notify_brush),
|
||||
editor);
|
||||
|
||||
gimp_view_set_viewable (GIMP_VIEW (brush_editor->preview),
|
||||
gimp_view_set_viewable (GIMP_VIEW (brush_editor->view),
|
||||
(GimpViewable *) data);
|
||||
|
||||
if (editor->data && GIMP_IS_BRUSH_GENERATED (editor->data))
|
||||
|
|
|
@ -40,7 +40,7 @@ struct _GimpBrushEditor
|
|||
{
|
||||
GimpDataEditor parent_instance;
|
||||
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
|
||||
GtkWidget *shape_group;
|
||||
GtkWidget *options_table;
|
||||
|
|
|
@ -58,8 +58,8 @@ GtkWidget * gimp_brush_factory_view_new (GimpViewType view_type,
|
|||
GimpDataFactory *factory,
|
||||
GimpContext *context,
|
||||
gboolean change_brush_spacing,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ static void gimp_buffer_view_activate_item (GimpContainerEditor *editor,
|
|||
|
||||
static void gimp_buffer_view_buffer_changed (Gimp *gimp,
|
||||
GimpBufferView *buffer_view);
|
||||
static void gimp_buffer_view_preview_notify (GimpContainerView *view,
|
||||
static void gimp_buffer_view_view_notify (GimpContainerView *view,
|
||||
GParamSpec *pspec,
|
||||
GimpBufferView *buffer_view);
|
||||
|
||||
|
@ -116,20 +116,20 @@ gimp_buffer_view_new (GimpViewType view_type,
|
|||
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
buffer_view->global_preview =
|
||||
buffer_view->global_view =
|
||||
gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_BUFFER,
|
||||
view_size, view_size, view_border_width,
|
||||
FALSE, FALSE, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), buffer_view->global_preview,
|
||||
gtk_box_pack_start (GTK_BOX (hbox), buffer_view->global_view,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (buffer_view->global_preview);
|
||||
gtk_widget_show (buffer_view->global_view);
|
||||
|
||||
g_signal_connect_object (editor->view, "notify::preview-size",
|
||||
G_CALLBACK (gimp_buffer_view_preview_notify),
|
||||
g_signal_connect_object (editor->view, "notify::view-size",
|
||||
G_CALLBACK (gimp_buffer_view_view_notify),
|
||||
buffer_view, 0);
|
||||
g_signal_connect_object (editor->view, "notify::preview-border-width",
|
||||
G_CALLBACK (gimp_buffer_view_preview_notify),
|
||||
g_signal_connect_object (editor->view, "notify::view-border-width",
|
||||
G_CALLBACK (gimp_buffer_view_view_notify),
|
||||
buffer_view, 0);
|
||||
|
||||
buffer_view->global_label = gtk_label_new (_("(None)"));
|
||||
|
@ -199,7 +199,7 @@ static void
|
|||
gimp_buffer_view_buffer_changed (Gimp *gimp,
|
||||
GimpBufferView *buffer_view)
|
||||
{
|
||||
gimp_view_set_viewable (GIMP_VIEW (buffer_view->global_preview),
|
||||
gimp_view_set_viewable (GIMP_VIEW (buffer_view->global_view),
|
||||
(GimpViewable *) gimp->global_buffer);
|
||||
|
||||
if (gimp->global_buffer)
|
||||
|
@ -218,16 +218,16 @@ gimp_buffer_view_buffer_changed (Gimp *gimp,
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_buffer_view_preview_notify (GimpContainerView *container_view,
|
||||
GParamSpec *pspec,
|
||||
GimpBufferView *buffer_view)
|
||||
gimp_buffer_view_view_notify (GimpContainerView *container_view,
|
||||
GParamSpec *pspec,
|
||||
GimpBufferView *buffer_view)
|
||||
{
|
||||
GimpView *view = GIMP_VIEW (buffer_view->global_preview);
|
||||
GimpView *view = GIMP_VIEW (buffer_view->global_view);
|
||||
gint view_size;
|
||||
gint view_border_width;
|
||||
|
||||
view_size = gimp_container_view_get_preview_size (container_view,
|
||||
&view_border_width);
|
||||
view_size = gimp_container_view_get_view_size (container_view,
|
||||
&view_border_width);
|
||||
|
||||
gimp_view_renderer_set_size_full (view->renderer,
|
||||
view_size, view_size, view_border_width);
|
||||
|
|
|
@ -40,7 +40,7 @@ struct _GimpBufferView
|
|||
{
|
||||
GimpContainerEditor parent_instance;
|
||||
|
||||
GtkWidget *global_preview;
|
||||
GtkWidget *global_view;
|
||||
GtkWidget *global_label;
|
||||
|
||||
GtkWidget *paste_button;
|
||||
|
@ -60,8 +60,8 @@ GType gimp_buffer_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_buffer_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ static void gimp_channel_tree_view_set_image (GimpItemTreeView *item_v
|
|||
GimpImage *gimage);
|
||||
static GimpItem * gimp_channel_tree_view_item_new (GimpImage *image);
|
||||
|
||||
static void gimp_channel_tree_view_set_preview_size (GimpContainerView *view);
|
||||
static void gimp_channel_tree_view_set_view_size (GimpContainerView *view);
|
||||
|
||||
static void gimp_channel_tree_view_set_context (GimpDocked *docked,
|
||||
GimpContext *context);
|
||||
|
@ -134,7 +134,7 @@ gimp_channel_tree_view_view_iface_init (GimpContainerViewInterface *view_iface)
|
|||
{
|
||||
parent_view_iface = g_type_interface_peek_parent (view_iface);
|
||||
|
||||
view_iface->set_preview_size = gimp_channel_tree_view_set_preview_size;
|
||||
view_iface->set_view_size = gimp_channel_tree_view_set_view_size;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -287,12 +287,12 @@ gimp_channel_tree_view_set_image (GimpItemTreeView *item_view,
|
|||
if (! channel_view->component_editor)
|
||||
{
|
||||
GimpContainerView *view = GIMP_CONTAINER_VIEW (item_view);
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, NULL);
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
channel_view->component_editor =
|
||||
gimp_component_editor_new (preview_size,
|
||||
gimp_component_editor_new (view_size,
|
||||
GIMP_EDITOR (item_view)->menu_factory);
|
||||
gimp_docked_set_context (GIMP_DOCKED (channel_view->component_editor),
|
||||
item_view->context);
|
||||
|
@ -341,18 +341,18 @@ gimp_channel_tree_view_item_new (GimpImage *image)
|
|||
/* GimpContainerView methods */
|
||||
|
||||
static void
|
||||
gimp_channel_tree_view_set_preview_size (GimpContainerView *view)
|
||||
gimp_channel_tree_view_set_view_size (GimpContainerView *view)
|
||||
{
|
||||
GimpChannelTreeView *channel_view = GIMP_CHANNEL_TREE_VIEW (view);
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
parent_view_iface->set_preview_size (view);
|
||||
parent_view_iface->set_view_size (view);
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, NULL);
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
if (channel_view->component_editor)
|
||||
gimp_component_editor_set_preview_size (GIMP_COMPONENT_EDITOR (channel_view->component_editor),
|
||||
preview_size);
|
||||
gimp_component_editor_set_view_size (GIMP_COMPONENT_EDITOR (channel_view->component_editor),
|
||||
view_size);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -260,14 +260,14 @@ gimp_component_editor_new (gint view_size,
|
|||
"ui-path", "/channels-popup",
|
||||
NULL);
|
||||
|
||||
gimp_component_editor_set_preview_size (editor, view_size);
|
||||
gimp_component_editor_set_view_size (editor, view_size);
|
||||
|
||||
return GTK_WIDGET (editor);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_component_editor_set_preview_size (GimpComponentEditor *editor,
|
||||
gint view_size)
|
||||
gimp_component_editor_set_view_size (GimpComponentEditor *editor,
|
||||
gint view_size)
|
||||
{
|
||||
GtkWidget *tree_widget;
|
||||
GtkIconSize icon_size;
|
||||
|
@ -306,7 +306,7 @@ gimp_component_editor_set_preview_size (GimpComponentEditor *editor,
|
|||
g_object_unref (renderer);
|
||||
}
|
||||
|
||||
editor->preview_size = view_size;
|
||||
editor->view_size = view_size;
|
||||
|
||||
gtk_tree_view_columns_autosize (editor->view);
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ gimp_component_editor_create_components (GimpComponentEditor *editor)
|
|||
visible = gimp_image_get_component_visible (gimage, components[i]);
|
||||
|
||||
renderer = gimp_view_renderer_new (G_TYPE_FROM_INSTANCE (gimage),
|
||||
editor->preview_size, 1, FALSE);
|
||||
editor->view_size, 1, FALSE);
|
||||
gimp_view_renderer_set_viewable (renderer, GIMP_VIEWABLE (gimage));
|
||||
gimp_view_renderer_remove_idle (renderer);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ struct _GimpComponentEditor
|
|||
{
|
||||
GimpImageEditor parent_instance;
|
||||
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
GtkTreeModel *model;
|
||||
GtkTreeView *view;
|
||||
|
@ -59,12 +59,12 @@ struct _GimpComponentEditorClass
|
|||
};
|
||||
|
||||
|
||||
GType gimp_component_editor_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_component_editor_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gimp_component_editor_new (gint preview_size,
|
||||
GimpMenuFactory *menu_factory);
|
||||
void gimp_component_editor_set_preview_size (GimpComponentEditor *editor,
|
||||
gint preview_size);
|
||||
GtkWidget * gimp_component_editor_new (gint view_size,
|
||||
GimpMenuFactory *menu_factory);
|
||||
void gimp_component_editor_set_view_size (GimpComponentEditor *editor,
|
||||
gint view_size);
|
||||
|
||||
|
||||
#endif /* __GIMP_COMPONENT_EDITOR_H__ */
|
||||
|
|
|
@ -107,7 +107,7 @@ gimp_container_box_set_size_request (GimpContainerBox *box,
|
|||
GimpContainerView *view;
|
||||
GtkScrolledWindowClass *sw_class;
|
||||
GtkRequisition req;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint scrollbar_width;
|
||||
gint border_x;
|
||||
gint border_y;
|
||||
|
@ -116,10 +116,10 @@ gimp_container_box_set_size_request (GimpContainerBox *box,
|
|||
|
||||
view = GIMP_CONTAINER_VIEW (box);
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, NULL);
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
g_return_if_fail (width <= 0 || width >= preview_size);
|
||||
g_return_if_fail (height <= 0 || height >= preview_size);
|
||||
g_return_if_fail (width <= 0 || width >= view_size);
|
||||
g_return_if_fail (height <= 0 || height >= view_size);
|
||||
|
||||
sw_class = GTK_SCROLLED_WINDOW_GET_CLASS (box->scrolled_win);
|
||||
|
||||
|
@ -175,10 +175,10 @@ gimp_container_box_get_preview (GimpDocked *docked,
|
|||
|
||||
prop_name = gimp_context_type_to_prop_name (container->children_type);
|
||||
|
||||
preview = gimp_prop_preview_new (G_OBJECT (context), prop_name, height);
|
||||
preview = gimp_prop_view_new (G_OBJECT (context), prop_name, height);
|
||||
GIMP_VIEW (preview)->renderer->size = -1;
|
||||
|
||||
gimp_container_view_get_preview_size (view, &border_width);
|
||||
gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
border_width = MIN (1, border_width);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ static gboolean gimp_container_combo_box_select_item (GimpContainerView *v
|
|||
GimpViewable *viewable,
|
||||
gpointer insert_data);
|
||||
static void gimp_container_combo_box_clear_items (GimpContainerView *view);
|
||||
static void gimp_container_combo_box_set_preview_size (GimpContainerView *view);
|
||||
static void gimp_container_combo_box_set_view_size (GimpContainerView *view);
|
||||
|
||||
static void gimp_container_combo_box_changed (GtkComboBox *combo_box,
|
||||
GimpContainerView *view);
|
||||
|
@ -145,13 +145,13 @@ gimp_container_combo_box_view_iface_init (GimpContainerViewInterface *iface)
|
|||
if (! parent_view_iface)
|
||||
parent_view_iface = g_type_default_interface_peek (GIMP_TYPE_CONTAINER_VIEW);
|
||||
|
||||
iface->insert_item = gimp_container_combo_box_insert_item;
|
||||
iface->remove_item = gimp_container_combo_box_remove_item;
|
||||
iface->reorder_item = gimp_container_combo_box_reorder_item;
|
||||
iface->rename_item = gimp_container_combo_box_rename_item;
|
||||
iface->select_item = gimp_container_combo_box_select_item;
|
||||
iface->clear_items = gimp_container_combo_box_clear_items;
|
||||
iface->set_preview_size = gimp_container_combo_box_set_preview_size;
|
||||
iface->insert_item = gimp_container_combo_box_insert_item;
|
||||
iface->remove_item = gimp_container_combo_box_remove_item;
|
||||
iface->reorder_item = gimp_container_combo_box_reorder_item;
|
||||
iface->rename_item = gimp_container_combo_box_rename_item;
|
||||
iface->select_item = gimp_container_combo_box_select_item;
|
||||
iface->clear_items = gimp_container_combo_box_clear_items;
|
||||
iface->set_view_size = gimp_container_combo_box_set_view_size;
|
||||
|
||||
iface->insert_data_free = (GDestroyNotify) g_free;
|
||||
}
|
||||
|
@ -159,8 +159,8 @@ gimp_container_combo_box_view_iface_init (GimpContainerViewInterface *iface)
|
|||
GtkWidget *
|
||||
gimp_container_combo_box_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width)
|
||||
gint view_size,
|
||||
gint view_border_width)
|
||||
{
|
||||
GtkWidget *combo_box;
|
||||
GimpContainerView *view;
|
||||
|
@ -173,8 +173,7 @@ gimp_container_combo_box_new (GimpContainer *container,
|
|||
|
||||
view = GIMP_CONTAINER_VIEW (combo_box);
|
||||
|
||||
gimp_container_view_set_preview_size (view,
|
||||
preview_size, preview_border_width);
|
||||
gimp_container_view_set_view_size (view, view_size, view_border_width);
|
||||
|
||||
if (container)
|
||||
gimp_container_view_set_container (view, container);
|
||||
|
@ -194,17 +193,17 @@ gimp_container_combo_box_set (GimpContainerComboBox *combo_box,
|
|||
GtkTreeModel *model;
|
||||
GimpViewRenderer *renderer;
|
||||
gchar *name;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box));
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
name = gimp_viewable_get_description (viewable, NULL);
|
||||
|
||||
renderer = gimp_view_renderer_new (G_TYPE_FROM_INSTANCE (viewable),
|
||||
preview_size, border_width,
|
||||
view_size, border_width,
|
||||
FALSE);
|
||||
gimp_view_renderer_set_viewable (renderer, viewable);
|
||||
gimp_view_renderer_remove_idle (renderer);
|
||||
|
@ -399,15 +398,15 @@ gimp_container_combo_box_clear_items (GimpContainerView *view)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_container_combo_box_set_preview_size (GimpContainerView *view)
|
||||
gimp_container_combo_box_set_view_size (GimpContainerView *view)
|
||||
{
|
||||
GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (view));
|
||||
GtkTreeIter iter;
|
||||
gboolean iter_valid;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
for (iter_valid = gtk_tree_model_get_iter_first (model, &iter);
|
||||
iter_valid;
|
||||
|
@ -419,7 +418,7 @@ gimp_container_combo_box_set_preview_size (GimpContainerView *view)
|
|||
COLUMN_RENDERER, &renderer,
|
||||
-1);
|
||||
|
||||
gimp_view_renderer_set_size (renderer, preview_size, border_width);
|
||||
gimp_view_renderer_set_size (renderer, view_size, border_width);
|
||||
g_object_unref (renderer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ GType gimp_container_combo_box_get_type (void) G_GNUC_CONST;
|
|||
|
||||
GtkWidget * gimp_container_combo_box_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width);
|
||||
gint view_size,
|
||||
gint view_border_width);
|
||||
|
||||
|
||||
#endif /* __GIMP_CONTAINER_COMBO_BOX_H__ */
|
||||
|
|
|
@ -111,8 +111,8 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||
GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_identifier)
|
||||
|
@ -120,10 +120,10 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||
g_return_val_if_fail (GIMP_IS_CONTAINER_EDITOR (editor), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
||||
g_return_val_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
||||
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
FALSE);
|
||||
g_return_val_if_fail (menu_factory == NULL ||
|
||||
GIMP_IS_MENU_FACTORY (menu_factory), FALSE);
|
||||
|
@ -134,16 +134,16 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||
editor->view =
|
||||
GIMP_CONTAINER_VIEW (gimp_container_grid_view_new (container,
|
||||
context,
|
||||
preview_size,
|
||||
preview_border_width));
|
||||
view_size,
|
||||
view_border_width));
|
||||
break;
|
||||
|
||||
case GIMP_VIEW_TYPE_LIST:
|
||||
editor->view =
|
||||
GIMP_CONTAINER_VIEW (gimp_container_tree_view_new (container,
|
||||
context,
|
||||
preview_size,
|
||||
preview_border_width));
|
||||
view_size,
|
||||
view_border_width));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -65,8 +65,8 @@ gboolean gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||
GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_path);
|
||||
|
|
|
@ -60,7 +60,7 @@ static gboolean gimp_container_entry_select_item (GimpContainerView *view,
|
|||
GimpViewable *viewable,
|
||||
gpointer insert_data);
|
||||
static void gimp_container_entry_clear_items (GimpContainerView *view);
|
||||
static void gimp_container_entry_set_preview_size (GimpContainerView *view);
|
||||
static void gimp_container_entry_set_view_size (GimpContainerView *view);
|
||||
|
||||
static void gimp_container_entry_changed (GtkEntry *entry,
|
||||
GimpContainerView *view);
|
||||
|
@ -136,13 +136,13 @@ gimp_container_entry_view_iface_init (GimpContainerViewInterface *iface)
|
|||
if (! parent_view_iface)
|
||||
parent_view_iface = g_type_default_interface_peek (GIMP_TYPE_CONTAINER_VIEW);
|
||||
|
||||
iface->insert_item = gimp_container_entry_insert_item;
|
||||
iface->remove_item = gimp_container_entry_remove_item;
|
||||
iface->reorder_item = gimp_container_entry_reorder_item;
|
||||
iface->rename_item = gimp_container_entry_rename_item;
|
||||
iface->select_item = gimp_container_entry_select_item;
|
||||
iface->clear_items = gimp_container_entry_clear_items;
|
||||
iface->set_preview_size = gimp_container_entry_set_preview_size;
|
||||
iface->insert_item = gimp_container_entry_insert_item;
|
||||
iface->remove_item = gimp_container_entry_remove_item;
|
||||
iface->reorder_item = gimp_container_entry_reorder_item;
|
||||
iface->rename_item = gimp_container_entry_rename_item;
|
||||
iface->select_item = gimp_container_entry_select_item;
|
||||
iface->clear_items = gimp_container_entry_clear_items;
|
||||
iface->set_view_size = gimp_container_entry_set_view_size;
|
||||
|
||||
iface->insert_data_free = (GDestroyNotify) g_free;
|
||||
}
|
||||
|
@ -150,8 +150,8 @@ gimp_container_entry_view_iface_init (GimpContainerViewInterface *iface)
|
|||
GtkWidget *
|
||||
gimp_container_entry_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width)
|
||||
gint view_size,
|
||||
gint view_border_width)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
GimpContainerView *view;
|
||||
|
@ -164,8 +164,7 @@ gimp_container_entry_new (GimpContainer *container,
|
|||
|
||||
view = GIMP_CONTAINER_VIEW (entry);
|
||||
|
||||
gimp_container_view_set_preview_size (view,
|
||||
preview_size, preview_border_width);
|
||||
gimp_container_view_set_view_size (view, view_size, view_border_width);
|
||||
|
||||
if (container)
|
||||
gimp_container_view_set_container (view, container);
|
||||
|
@ -184,13 +183,13 @@ gimp_container_entry_set (GimpContainerEntry *entry,
|
|||
GimpContainerView *view = GIMP_CONTAINER_VIEW (entry);
|
||||
GtkTreeModel *model = gimp_container_entry_get_model (entry);
|
||||
GimpViewRenderer *renderer;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
renderer = gimp_view_renderer_new (G_TYPE_FROM_INSTANCE (viewable),
|
||||
preview_size, border_width,
|
||||
view_size, border_width,
|
||||
FALSE);
|
||||
gimp_view_renderer_set_viewable (renderer, viewable);
|
||||
gimp_view_renderer_remove_idle (renderer);
|
||||
|
@ -338,18 +337,18 @@ gimp_container_entry_clear_items (GimpContainerView *view)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_container_entry_set_preview_size (GimpContainerView *view)
|
||||
gimp_container_entry_set_view_size (GimpContainerView *view)
|
||||
{
|
||||
GtkTreeModel *model = gimp_container_entry_get_model (view);
|
||||
GtkTreeIter iter;
|
||||
gboolean iter_valid;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
if (! model)
|
||||
return;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
for (iter_valid = gtk_tree_model_get_iter_first (model, &iter);
|
||||
iter_valid;
|
||||
|
@ -361,7 +360,7 @@ gimp_container_entry_set_preview_size (GimpContainerView *view)
|
|||
GIMP_CONTAINER_ENTRY_COLUMN_RENDERER, &renderer,
|
||||
-1);
|
||||
|
||||
gimp_view_renderer_set_size (renderer, preview_size, border_width);
|
||||
gimp_view_renderer_set_size (renderer, view_size, border_width);
|
||||
g_object_unref (renderer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,8 +59,8 @@ GType gimp_container_entry_get_type (void) G_GNUC_CONST;
|
|||
|
||||
GtkWidget * gimp_container_entry_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width);
|
||||
gint view_size,
|
||||
gint view_border_width);
|
||||
|
||||
|
||||
#endif /* __GIMP_CONTAINER_ENTRY_H__ */
|
||||
|
|
|
@ -77,7 +77,7 @@ static gboolean gimp_container_grid_view_select_item (GimpContainerView *v
|
|||
GimpViewable *viewable,
|
||||
gpointer insert_data);
|
||||
static void gimp_container_grid_view_clear_items (GimpContainerView *view);
|
||||
static void gimp_container_grid_view_set_preview_size (GimpContainerView *view);
|
||||
static void gimp_container_grid_view_set_view_size (GimpContainerView *view);
|
||||
static gboolean gimp_container_grid_view_item_selected(GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
gpointer data);
|
||||
|
@ -196,13 +196,13 @@ gimp_container_grid_view_view_iface_init (GimpContainerViewInterface *iface)
|
|||
{
|
||||
parent_view_iface = g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->insert_item = gimp_container_grid_view_insert_item;
|
||||
iface->remove_item = gimp_container_grid_view_remove_item;
|
||||
iface->reorder_item = gimp_container_grid_view_reorder_item;
|
||||
iface->rename_item = gimp_container_grid_view_rename_item;
|
||||
iface->select_item = gimp_container_grid_view_select_item;
|
||||
iface->clear_items = gimp_container_grid_view_clear_items;
|
||||
iface->set_preview_size = gimp_container_grid_view_set_preview_size;
|
||||
iface->insert_item = gimp_container_grid_view_insert_item;
|
||||
iface->remove_item = gimp_container_grid_view_remove_item;
|
||||
iface->reorder_item = gimp_container_grid_view_reorder_item;
|
||||
iface->rename_item = gimp_container_grid_view_rename_item;
|
||||
iface->select_item = gimp_container_grid_view_select_item;
|
||||
iface->clear_items = gimp_container_grid_view_clear_items;
|
||||
iface->set_view_size = gimp_container_grid_view_set_view_size;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@ -227,8 +227,7 @@ gimp_container_grid_view_new (GimpContainer *container,
|
|||
|
||||
view = GIMP_CONTAINER_VIEW (grid_view);
|
||||
|
||||
gimp_container_view_set_preview_size (view, view_size,
|
||||
view_border_width);
|
||||
gimp_container_view_set_view_size (view, view_size, view_border_width);
|
||||
|
||||
if (container)
|
||||
gimp_container_view_set_container (view, container);
|
||||
|
@ -389,87 +388,85 @@ gimp_container_grid_view_popup_menu (GtkWidget *widget)
|
|||
}
|
||||
|
||||
static gpointer
|
||||
gimp_container_grid_view_insert_item (GimpContainerView *view,
|
||||
gimp_container_grid_view_insert_item (GimpContainerView *container_view,
|
||||
GimpViewable *viewable,
|
||||
gint index)
|
||||
{
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (view);
|
||||
GtkWidget *preview;
|
||||
gint preview_size;
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (container_view);
|
||||
GtkWidget *view;
|
||||
gint view_size;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, NULL);
|
||||
view_size = gimp_container_view_get_view_size (container_view, NULL);
|
||||
|
||||
preview = gimp_view_new_full (viewable,
|
||||
preview_size,
|
||||
preview_size,
|
||||
1,
|
||||
FALSE, TRUE, TRUE);
|
||||
gimp_view_renderer_set_border_type (GIMP_VIEW (preview)->renderer,
|
||||
view = gimp_view_new_full (viewable,
|
||||
view_size, view_size, 1,
|
||||
FALSE, TRUE, TRUE);
|
||||
gimp_view_renderer_set_border_type (GIMP_VIEW (view)->renderer,
|
||||
GIMP_VIEW_BORDER_WHITE);
|
||||
gimp_view_renderer_remove_idle (GIMP_VIEW (preview)->renderer);
|
||||
gimp_view_renderer_remove_idle (GIMP_VIEW (view)->renderer);
|
||||
|
||||
gtk_wrap_box_pack (GTK_WRAP_BOX (grid_view->wrap_box), preview,
|
||||
gtk_wrap_box_pack (GTK_WRAP_BOX (grid_view->wrap_box), view,
|
||||
FALSE, FALSE, FALSE, FALSE);
|
||||
|
||||
if (index != -1)
|
||||
gtk_wrap_box_reorder_child (GTK_WRAP_BOX (grid_view->wrap_box),
|
||||
preview, index);
|
||||
view, index);
|
||||
|
||||
gtk_widget_show (preview);
|
||||
gtk_widget_show (view);
|
||||
|
||||
g_signal_connect (preview, "button-press-event",
|
||||
g_signal_connect (view, "button-press-event",
|
||||
G_CALLBACK (gimp_container_grid_view_item_selected),
|
||||
view);
|
||||
g_signal_connect (preview, "double-clicked",
|
||||
container_view);
|
||||
g_signal_connect (view, "double-clicked",
|
||||
G_CALLBACK (gimp_container_grid_view_item_activated),
|
||||
view);
|
||||
g_signal_connect (preview, "context",
|
||||
container_view);
|
||||
g_signal_connect (view, "context",
|
||||
G_CALLBACK (gimp_container_grid_view_item_context),
|
||||
view);
|
||||
container_view);
|
||||
|
||||
return (gpointer) preview;
|
||||
return (gpointer) view;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_container_grid_view_remove_item (GimpContainerView *view,
|
||||
gimp_container_grid_view_remove_item (GimpContainerView *container_view,
|
||||
GimpViewable *viewable,
|
||||
gpointer insert_data)
|
||||
{
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (view);
|
||||
GtkWidget *preview = GTK_WIDGET (insert_data);
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (container_view);
|
||||
GtkWidget *view = GTK_WIDGET (insert_data);
|
||||
|
||||
if (preview == (GtkWidget *) grid_view->selected_item)
|
||||
if (view == (GtkWidget *) grid_view->selected_item)
|
||||
grid_view->selected_item = NULL;
|
||||
|
||||
gtk_container_remove (GTK_CONTAINER (grid_view->wrap_box), preview);
|
||||
gtk_container_remove (GTK_CONTAINER (grid_view->wrap_box), view);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_container_grid_view_reorder_item (GimpContainerView *view,
|
||||
gimp_container_grid_view_reorder_item (GimpContainerView *container_view,
|
||||
GimpViewable *viewable,
|
||||
gint new_index,
|
||||
gpointer insert_data)
|
||||
{
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (view);
|
||||
GtkWidget *preview = GTK_WIDGET (insert_data);
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (container_view);
|
||||
GtkWidget *view = GTK_WIDGET (insert_data);
|
||||
|
||||
gtk_wrap_box_reorder_child (GTK_WRAP_BOX (grid_view->wrap_box),
|
||||
preview, new_index);
|
||||
view, new_index);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_container_grid_view_rename_item (GimpContainerView *view,
|
||||
gimp_container_grid_view_rename_item (GimpContainerView *container_view,
|
||||
GimpViewable *viewable,
|
||||
gpointer insert_data)
|
||||
{
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (view);
|
||||
GtkWidget *preview = GTK_WIDGET (insert_data);
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (container_view);
|
||||
GtkWidget *view = GTK_WIDGET (insert_data);
|
||||
|
||||
if (preview == (GtkWidget *) grid_view->selected_item)
|
||||
if (view == (GtkWidget *) grid_view->selected_item)
|
||||
{
|
||||
gchar *name = gimp_viewable_get_description (viewable, NULL);
|
||||
|
||||
gimp_editor_set_name (GIMP_EDITOR (view), name);
|
||||
gimp_editor_set_name (GIMP_EDITOR (container_view), name);
|
||||
g_free (name);
|
||||
}
|
||||
}
|
||||
|
@ -499,13 +496,13 @@ gimp_container_grid_view_clear_items (GimpContainerView *view)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_container_grid_view_set_preview_size (GimpContainerView *view)
|
||||
gimp_container_grid_view_set_view_size (GimpContainerView *view)
|
||||
{
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (view);
|
||||
GtkWrapBoxChild *child;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, NULL);
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
for (child = GTK_WRAP_BOX (grid_view->wrap_box)->children;
|
||||
child;
|
||||
|
@ -514,7 +511,7 @@ gimp_container_grid_view_set_preview_size (GimpContainerView *view)
|
|||
GimpView *view = GIMP_VIEW (child->widget);
|
||||
|
||||
gimp_view_renderer_set_size (view->renderer,
|
||||
preview_size,
|
||||
view_size,
|
||||
view->renderer->border_width);
|
||||
}
|
||||
|
||||
|
@ -566,30 +563,30 @@ gimp_container_grid_view_item_context (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_container_grid_view_highlight_item (GimpContainerView *view,
|
||||
gimp_container_grid_view_highlight_item (GimpContainerView *container_view,
|
||||
GimpViewable *viewable,
|
||||
gpointer insert_data)
|
||||
{
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (view);
|
||||
GimpContainerBox *box = GIMP_CONTAINER_BOX (view);
|
||||
GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (container_view);
|
||||
GimpContainerBox *box = GIMP_CONTAINER_BOX (container_view);
|
||||
GimpContainer *container;
|
||||
GimpView *preview = NULL;
|
||||
GimpView *view = NULL;
|
||||
|
||||
container = gimp_container_view_get_container (view);
|
||||
container = gimp_container_view_get_container (container_view);
|
||||
|
||||
if (insert_data)
|
||||
preview = GIMP_VIEW (insert_data);
|
||||
view = GIMP_VIEW (insert_data);
|
||||
|
||||
if (grid_view->selected_item && grid_view->selected_item != preview)
|
||||
if (grid_view->selected_item && grid_view->selected_item != view)
|
||||
{
|
||||
gimp_view_renderer_set_border_type (grid_view->selected_item->renderer,
|
||||
GIMP_VIEW_BORDER_WHITE);
|
||||
gimp_view_renderer_update (grid_view->selected_item->renderer);
|
||||
}
|
||||
|
||||
if (preview)
|
||||
if (view)
|
||||
{
|
||||
GtkRequisition preview_requisition;
|
||||
GtkRequisition view_requisition;
|
||||
GtkAdjustment *adj;
|
||||
gint item_height;
|
||||
gint index;
|
||||
|
@ -599,9 +596,9 @@ gimp_container_grid_view_highlight_item (GimpContainerView *view,
|
|||
adj = gtk_scrolled_window_get_vadjustment
|
||||
(GTK_SCROLLED_WINDOW (box->scrolled_win));
|
||||
|
||||
gtk_widget_size_request (GTK_WIDGET (preview), &preview_requisition);
|
||||
gtk_widget_size_request (GTK_WIDGET (view), &view_requisition);
|
||||
|
||||
item_height = preview_requisition.height;
|
||||
item_height = view_requisition.height;
|
||||
|
||||
index = gimp_container_get_child_index (container,
|
||||
GIMP_OBJECT (viewable));
|
||||
|
@ -618,11 +615,11 @@ gimp_container_grid_view_highlight_item (GimpContainerView *view,
|
|||
(row + 1) * item_height - adj->page_size);
|
||||
}
|
||||
|
||||
gimp_view_renderer_set_border_type (preview->renderer,
|
||||
gimp_view_renderer_set_border_type (view->renderer,
|
||||
GIMP_VIEW_BORDER_BLACK);
|
||||
gimp_view_renderer_update (preview->renderer);
|
||||
gimp_view_renderer_update (view->renderer);
|
||||
|
||||
name = gimp_viewable_get_description (preview->renderer->viewable, NULL);
|
||||
name = gimp_viewable_get_description (view->renderer->viewable, NULL);
|
||||
gimp_editor_set_name (GIMP_EDITOR (grid_view), name);
|
||||
g_free (name);
|
||||
}
|
||||
|
@ -631,7 +628,7 @@ gimp_container_grid_view_highlight_item (GimpContainerView *view,
|
|||
gimp_editor_set_name (GIMP_EDITOR (grid_view), NULL);
|
||||
}
|
||||
|
||||
grid_view->selected_item = preview;
|
||||
grid_view->selected_item = view;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -639,9 +636,9 @@ gimp_container_grid_view_viewport_resized (GtkWidget *widget,
|
|||
GtkAllocation *allocation,
|
||||
GimpContainerGridView *grid_view)
|
||||
{
|
||||
GimpContainerView *view = GIMP_CONTAINER_VIEW (grid_view);
|
||||
GimpContainerView *container_view = GIMP_CONTAINER_VIEW (grid_view);
|
||||
|
||||
if (gimp_container_view_get_container (view))
|
||||
if (gimp_container_view_get_container (container_view))
|
||||
{
|
||||
GList *children;
|
||||
gint n_children;
|
||||
|
@ -651,16 +648,16 @@ gimp_container_grid_view_viewport_resized (GtkWidget *widget,
|
|||
|
||||
if (children)
|
||||
{
|
||||
GtkRequisition preview_requisition;
|
||||
GtkRequisition view_requisition;
|
||||
gint columns;
|
||||
gint rows;
|
||||
|
||||
gtk_widget_size_request (GTK_WIDGET (children->data),
|
||||
&preview_requisition);
|
||||
&view_requisition);
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
columns = MAX (1, allocation->width / preview_requisition.width);
|
||||
columns = MAX (1, allocation->width / view_requisition.width);
|
||||
|
||||
rows = n_children / columns;
|
||||
|
||||
|
@ -673,22 +670,22 @@ gimp_container_grid_view_viewport_resized (GtkWidget *widget,
|
|||
grid_view->columns = columns;
|
||||
|
||||
gtk_widget_set_size_request (grid_view->wrap_box,
|
||||
columns * preview_requisition.width,
|
||||
rows * preview_requisition.height);
|
||||
columns * view_requisition.width,
|
||||
rows * view_requisition.height);
|
||||
|
||||
}
|
||||
|
||||
grid_view->visible_rows = (allocation->height /
|
||||
preview_requisition.height);
|
||||
view_requisition.height);
|
||||
}
|
||||
|
||||
if (grid_view->selected_item)
|
||||
{
|
||||
GimpView *preview = grid_view->selected_item;
|
||||
GimpView *view = grid_view->selected_item;
|
||||
|
||||
gimp_container_grid_view_highlight_item (view,
|
||||
preview->viewable,
|
||||
preview);
|
||||
gimp_container_grid_view_highlight_item (container_view,
|
||||
view->viewable,
|
||||
view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -696,12 +693,12 @@ gimp_container_grid_view_viewport_resized (GtkWidget *widget,
|
|||
static gboolean
|
||||
gimp_container_grid_view_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpContainerGridView *view)
|
||||
GimpContainerGridView *grid_view)
|
||||
{
|
||||
switch (bevent->button)
|
||||
{
|
||||
case 3:
|
||||
gimp_editor_popup_menu (GIMP_EDITOR (view), NULL, NULL);
|
||||
gimp_editor_popup_menu (GIMP_EDITOR (grid_view), NULL, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -63,8 +63,8 @@ GType gimp_container_grid_view_get_type (void) G_GNUC_CONST;
|
|||
|
||||
GtkWidget * gimp_container_grid_view_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width);
|
||||
gint view_size,
|
||||
gint view_border_width);
|
||||
|
||||
|
||||
#endif /* __GIMP_CONTAINER_GRID_VIEW_H__ */
|
||||
|
|
|
@ -131,10 +131,10 @@ gimp_container_popup_class_init (GimpContainerPopupClass *klass)
|
|||
static void
|
||||
gimp_container_popup_init (GimpContainerPopup *popup)
|
||||
{
|
||||
popup->view_type = GIMP_VIEW_TYPE_LIST;
|
||||
popup->default_preview_size = GIMP_VIEW_SIZE_SMALL;
|
||||
popup->preview_size = GIMP_VIEW_SIZE_SMALL;
|
||||
popup->preview_border_width = 1;
|
||||
popup->view_type = GIMP_VIEW_TYPE_LIST;
|
||||
popup->default_view_size = GIMP_VIEW_SIZE_SMALL;
|
||||
popup->view_size = GIMP_VIEW_SIZE_SMALL;
|
||||
popup->view_border_width = 1;
|
||||
|
||||
popup->frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (popup->frame), GTK_SHADOW_OUT);
|
||||
|
@ -322,9 +322,9 @@ GtkWidget *
|
|||
gimp_container_popup_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
GimpViewType view_type,
|
||||
gint default_preview_size,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint default_view_size,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
|
@ -334,13 +334,13 @@ gimp_container_popup_new (GimpContainer *container,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (default_preview_size > 0 &&
|
||||
default_preview_size <= GIMP_VIEWABLE_MAX_POPUP_SIZE,
|
||||
g_return_val_if_fail (default_view_size > 0 &&
|
||||
default_view_size <= GIMP_VIEWABLE_MAX_POPUP_SIZE,
|
||||
NULL);
|
||||
g_return_val_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_POPUP_SIZE, NULL);
|
||||
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_POPUP_SIZE, NULL);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
NULL);
|
||||
g_return_val_if_fail (dialog_factory == NULL ||
|
||||
GIMP_IS_DIALOG_FACTORY (dialog_factory), NULL);
|
||||
|
@ -360,10 +360,10 @@ gimp_container_popup_new (GimpContainer *container,
|
|||
popup->orig_context = context;
|
||||
popup->context = gimp_context_new (context->gimp, "popup", context);
|
||||
|
||||
popup->view_type = view_type;
|
||||
popup->default_preview_size = default_preview_size;
|
||||
popup->preview_size = preview_size;
|
||||
popup->preview_border_width = preview_border_width;
|
||||
popup->view_type = view_type;
|
||||
popup->default_view_size = default_view_size;
|
||||
popup->view_size = view_size;
|
||||
popup->view_border_width = view_border_width;
|
||||
|
||||
g_signal_connect (popup->context,
|
||||
gimp_context_type_to_signal_name (container->children_type),
|
||||
|
@ -462,16 +462,16 @@ gimp_container_popup_set_view_type (GimpContainerPopup *popup,
|
|||
}
|
||||
|
||||
gint
|
||||
gimp_container_popup_get_preview_size (GimpContainerPopup *popup)
|
||||
gimp_container_popup_get_view_size (GimpContainerPopup *popup)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER_POPUP (popup), GIMP_VIEW_SIZE_SMALL);
|
||||
|
||||
return popup->preview_size;
|
||||
return popup->view_size;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_container_popup_set_preview_size (GimpContainerPopup *popup,
|
||||
gint preview_size)
|
||||
gimp_container_popup_set_view_size (GimpContainerPopup *popup,
|
||||
gint view_size)
|
||||
{
|
||||
GtkWidget *scrolled_win;
|
||||
gint viewport_width;
|
||||
|
@ -482,17 +482,17 @@ gimp_container_popup_set_preview_size (GimpContainerPopup *popup,
|
|||
|
||||
viewport_width = GTK_BIN (scrolled_win)->child->allocation.width;
|
||||
|
||||
preview_size = CLAMP (preview_size, GIMP_VIEW_SIZE_TINY,
|
||||
MIN (GIMP_VIEW_SIZE_GIGANTIC,
|
||||
viewport_width - 2 * popup->preview_border_width));
|
||||
view_size = CLAMP (view_size, GIMP_VIEW_SIZE_TINY,
|
||||
MIN (GIMP_VIEW_SIZE_GIGANTIC,
|
||||
viewport_width - 2 * popup->view_border_width));
|
||||
|
||||
if (preview_size != popup->preview_size)
|
||||
if (view_size != popup->view_size)
|
||||
{
|
||||
popup->preview_size = preview_size;
|
||||
popup->view_size = view_size;
|
||||
|
||||
gimp_container_view_set_preview_size (popup->editor->view,
|
||||
popup->preview_size,
|
||||
popup->preview_border_width);
|
||||
gimp_container_view_set_view_size (popup->editor->view,
|
||||
popup->view_size,
|
||||
popup->view_border_width);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -510,18 +510,18 @@ gimp_container_popup_create_view (GimpContainerPopup *popup)
|
|||
popup->view_type,
|
||||
popup->container,
|
||||
popup->context,
|
||||
popup->preview_size,
|
||||
popup->preview_border_width,
|
||||
popup->view_size,
|
||||
popup->view_border_width,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
gimp_container_view_set_reorderable (GIMP_CONTAINER_VIEW (popup->editor->view),
|
||||
FALSE);
|
||||
|
||||
gimp_container_box_set_size_request (GIMP_CONTAINER_BOX (popup->editor->view),
|
||||
6 * (popup->default_preview_size +
|
||||
2 * popup->preview_border_width),
|
||||
10 * (popup->default_preview_size +
|
||||
2 * popup->preview_border_width));
|
||||
6 * (popup->default_view_size +
|
||||
2 * popup->view_border_width),
|
||||
10 * (popup->default_view_size +
|
||||
2 * popup->view_border_width));
|
||||
|
||||
if (GIMP_IS_EDITOR (popup->editor->view))
|
||||
gimp_editor_set_show_name (GIMP_EDITOR (popup->editor->view), FALSE);
|
||||
|
@ -561,24 +561,22 @@ static void
|
|||
gimp_container_popup_smaller_clicked (GtkWidget *button,
|
||||
GimpContainerPopup *popup)
|
||||
{
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (popup->editor->view,
|
||||
NULL);
|
||||
view_size = gimp_container_view_get_view_size (popup->editor->view, NULL);
|
||||
|
||||
gimp_container_popup_set_preview_size (popup, preview_size * 0.8);
|
||||
gimp_container_popup_set_view_size (popup, view_size * 0.8);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_container_popup_larger_clicked (GtkWidget *button,
|
||||
GimpContainerPopup *popup)
|
||||
{
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (popup->editor->view,
|
||||
NULL);
|
||||
view_size = gimp_container_view_get_view_size (popup->editor->view, NULL);
|
||||
|
||||
gimp_container_popup_set_preview_size (popup, preview_size * 1.2);
|
||||
gimp_container_popup_set_view_size (popup, view_size * 1.2);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -45,9 +45,9 @@ struct _GimpContainerPopup
|
|||
GimpContext *context;
|
||||
|
||||
GimpViewType view_type;
|
||||
gint default_preview_size;
|
||||
gint preview_size;
|
||||
gint preview_border_width;
|
||||
gint default_view_size;
|
||||
gint view_size;
|
||||
gint view_border_width;
|
||||
|
||||
GtkWidget *frame;
|
||||
GimpContainerEditor *editor;
|
||||
|
@ -72,9 +72,9 @@ GType gimp_container_popup_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_container_popup_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
GimpViewType view_type,
|
||||
gint default_preview_size,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint default_view_size,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
|
@ -86,9 +86,9 @@ GimpViewType gimp_container_popup_get_view_type (GimpContainerPopup *popup);
|
|||
void gimp_container_popup_set_view_type (GimpContainerPopup *popup,
|
||||
GimpViewType view_type);
|
||||
|
||||
gint gimp_container_popup_get_preview_size (GimpContainerPopup *popup);
|
||||
void gimp_container_popup_set_preview_size (GimpContainerPopup *popup,
|
||||
gint preview_size);
|
||||
gint gimp_container_popup_get_view_size (GimpContainerPopup *popup);
|
||||
void gimp_container_popup_set_view_size (GimpContainerPopup *popup,
|
||||
gint view_size);
|
||||
|
||||
|
||||
#endif /* __GIMP_CONTAINER_POPUP_H__ */
|
||||
|
|
|
@ -80,7 +80,7 @@ static gboolean gimp_container_tree_view_select_item (GimpContainerView *v
|
|||
GimpViewable *viewable,
|
||||
gpointer insert_data);
|
||||
static void gimp_container_tree_view_clear_items (GimpContainerView *view);
|
||||
static void gimp_container_tree_view_set_preview_size (GimpContainerView *view);
|
||||
static void gimp_container_tree_view_set_view_size (GimpContainerView *view);
|
||||
|
||||
static void gimp_container_tree_view_name_canceled (GtkCellRendererText *cell,
|
||||
GimpContainerTreeView *tree_view);
|
||||
|
@ -156,14 +156,14 @@ gimp_container_tree_view_view_iface_init (GimpContainerViewInterface *iface)
|
|||
{
|
||||
parent_view_iface = g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->set_container = gimp_container_tree_view_set_container;
|
||||
iface->insert_item = gimp_container_tree_view_insert_item;
|
||||
iface->remove_item = gimp_container_tree_view_remove_item;
|
||||
iface->reorder_item = gimp_container_tree_view_reorder_item;
|
||||
iface->rename_item = gimp_container_tree_view_rename_item;
|
||||
iface->select_item = gimp_container_tree_view_select_item;
|
||||
iface->clear_items = gimp_container_tree_view_clear_items;
|
||||
iface->set_preview_size = gimp_container_tree_view_set_preview_size;
|
||||
iface->set_container = gimp_container_tree_view_set_container;
|
||||
iface->insert_item = gimp_container_tree_view_insert_item;
|
||||
iface->remove_item = gimp_container_tree_view_remove_item;
|
||||
iface->reorder_item = gimp_container_tree_view_reorder_item;
|
||||
iface->rename_item = gimp_container_tree_view_rename_item;
|
||||
iface->select_item = gimp_container_tree_view_select_item;
|
||||
iface->clear_items = gimp_container_tree_view_clear_items;
|
||||
iface->set_view_size = gimp_container_tree_view_set_view_size;
|
||||
|
||||
iface->insert_data_free = (GDestroyNotify) g_free;
|
||||
}
|
||||
|
@ -351,8 +351,8 @@ gimp_container_tree_view_popup_menu (GtkWidget *widget)
|
|||
GtkWidget *
|
||||
gimp_container_tree_view_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width)
|
||||
gint view_size,
|
||||
gint view_border_width)
|
||||
{
|
||||
GimpContainerTreeView *tree_view;
|
||||
GimpContainerView *view;
|
||||
|
@ -360,18 +360,17 @@ gimp_container_tree_view_new (GimpContainer *container,
|
|||
g_return_val_if_fail (container == NULL || GIMP_IS_CONTAINER (container),
|
||||
NULL);
|
||||
g_return_val_if_fail (context == NULL || GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
NULL);
|
||||
|
||||
tree_view = g_object_new (GIMP_TYPE_CONTAINER_TREE_VIEW, NULL);
|
||||
|
||||
view = GIMP_CONTAINER_VIEW (tree_view);
|
||||
|
||||
gimp_container_view_set_preview_size (view, preview_size,
|
||||
preview_border_width);
|
||||
gimp_container_view_set_view_size (view, view_size, view_border_width);
|
||||
|
||||
if (container)
|
||||
gimp_container_view_set_container (view, container);
|
||||
|
@ -390,13 +389,13 @@ gimp_container_tree_view_set (GimpContainerTreeView *tree_view,
|
|||
GimpContainerView *view = GIMP_CONTAINER_VIEW (tree_view);
|
||||
GimpViewRenderer *renderer;
|
||||
gchar *name;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
renderer = gimp_view_renderer_new (G_TYPE_FROM_INSTANCE (viewable),
|
||||
preview_size, border_width,
|
||||
view_size, border_width,
|
||||
FALSE);
|
||||
gimp_view_renderer_set_viewable (renderer, viewable);
|
||||
gimp_view_renderer_remove_idle (renderer);
|
||||
|
@ -678,17 +677,17 @@ gimp_container_tree_view_clear_items (GimpContainerView *view)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_container_tree_view_set_preview_size (GimpContainerView *view)
|
||||
gimp_container_tree_view_set_view_size (GimpContainerView *view)
|
||||
{
|
||||
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
|
||||
GtkWidget *tree_widget;
|
||||
GtkTreeIter iter;
|
||||
GList *list;
|
||||
gboolean iter_valid;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
if (tree_view->model)
|
||||
{
|
||||
|
@ -702,7 +701,7 @@ gimp_container_tree_view_set_preview_size (GimpContainerView *view)
|
|||
COLUMN_RENDERER, &renderer,
|
||||
-1);
|
||||
|
||||
gimp_view_renderer_set_size (renderer, preview_size, border_width);
|
||||
gimp_view_renderer_set_size (renderer, view_size, border_width);
|
||||
g_object_unref (renderer);
|
||||
}
|
||||
}
|
||||
|
@ -724,9 +723,9 @@ gimp_container_tree_view_set_preview_size (GimpContainerView *view)
|
|||
icon_size = gimp_get_icon_size (tree_widget,
|
||||
stock_id,
|
||||
GTK_ICON_SIZE_BUTTON,
|
||||
preview_size -
|
||||
view_size -
|
||||
2 * tree_widget->style->xthickness,
|
||||
preview_size -
|
||||
view_size -
|
||||
2 * tree_widget->style->ythickness);
|
||||
|
||||
g_object_set (list->data, "stock-size", icon_size, NULL);
|
||||
|
|
|
@ -114,8 +114,8 @@ GType gimp_container_tree_view_get_type (void) G_GNUC_CONST;
|
|||
|
||||
GtkWidget * gimp_container_tree_view_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width);
|
||||
gint view_size,
|
||||
gint view_border_width);
|
||||
|
||||
|
||||
#endif /* __GIMP_CONTAINER_TREE_VIEW_H__ */
|
||||
|
|
|
@ -60,8 +60,8 @@ struct _GimpContainerViewPrivate
|
|||
|
||||
GHashTable *hash_table;
|
||||
|
||||
gint preview_size;
|
||||
gint preview_border_width;
|
||||
gint view_size;
|
||||
gint view_border_width;
|
||||
gboolean reorderable;
|
||||
|
||||
/* initialized by subclass */
|
||||
|
@ -184,17 +184,17 @@ gimp_container_view_iface_base_init (GimpContainerViewInterface *view_iface)
|
|||
GIMP_TYPE_OBJECT,
|
||||
G_TYPE_POINTER);
|
||||
|
||||
view_iface->select_item = NULL;
|
||||
view_iface->activate_item = NULL;
|
||||
view_iface->context_item = NULL;
|
||||
view_iface->select_item = NULL;
|
||||
view_iface->activate_item = NULL;
|
||||
view_iface->context_item = NULL;
|
||||
|
||||
view_iface->set_container = gimp_container_view_real_set_container;
|
||||
view_iface->insert_item = NULL;
|
||||
view_iface->remove_item = NULL;
|
||||
view_iface->reorder_item = NULL;
|
||||
view_iface->rename_item = NULL;
|
||||
view_iface->clear_items = gimp_container_view_real_clear_items;
|
||||
view_iface->set_preview_size = NULL;
|
||||
view_iface->set_container = gimp_container_view_real_set_container;
|
||||
view_iface->insert_item = NULL;
|
||||
view_iface->remove_item = NULL;
|
||||
view_iface->reorder_item = NULL;
|
||||
view_iface->rename_item = NULL;
|
||||
view_iface->clear_items = gimp_container_view_real_clear_items;
|
||||
view_iface->set_view_size = NULL;
|
||||
|
||||
view_iface->insert_data_free = NULL;
|
||||
|
||||
|
@ -217,7 +217,7 @@ gimp_container_view_iface_base_init (GimpContainerViewInterface *view_iface)
|
|||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_interface_install_property (view_iface,
|
||||
g_param_spec_int ("preview-size",
|
||||
g_param_spec_int ("view-size",
|
||||
NULL, NULL,
|
||||
1, GIMP_VIEWABLE_MAX_PREVIEW_SIZE,
|
||||
GIMP_VIEW_SIZE_MEDIUM,
|
||||
|
@ -225,7 +225,7 @@ gimp_container_view_iface_base_init (GimpContainerViewInterface *view_iface)
|
|||
G_PARAM_CONSTRUCT));
|
||||
|
||||
g_object_interface_install_property (view_iface,
|
||||
g_param_spec_int ("preview-border-width",
|
||||
g_param_spec_int ("view-border-width",
|
||||
NULL, NULL,
|
||||
0, GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
1,
|
||||
|
@ -278,7 +278,7 @@ gimp_container_view_get_private (GimpContainerView *view)
|
|||
|
||||
private = g_new0 (GimpContainerViewPrivate, 1);
|
||||
|
||||
private->preview_border_width = 1;
|
||||
private->view_border_width = 1;
|
||||
|
||||
g_object_set_qdata_full ((GObject *) view, private_key, private,
|
||||
(GDestroyNotify) gimp_container_view_private_finalize);
|
||||
|
@ -315,11 +315,11 @@ gimp_container_view_install_properties (GObjectClass *klass)
|
|||
GIMP_CONTAINER_VIEW_PROP_REORDERABLE,
|
||||
"reorderable");
|
||||
g_object_class_override_property (klass,
|
||||
GIMP_CONTAINER_VIEW_PROP_PREVIEW_SIZE,
|
||||
"preview-size");
|
||||
GIMP_CONTAINER_VIEW_PROP_VIEW_SIZE,
|
||||
"view-size");
|
||||
g_object_class_override_property (klass,
|
||||
GIMP_CONTAINER_VIEW_PROP_PREVIEW_BORDER_WIDTH,
|
||||
"preview-border-width");
|
||||
GIMP_CONTAINER_VIEW_PROP_VIEW_BORDER_WIDTH,
|
||||
"view-border-width");
|
||||
}
|
||||
|
||||
GimpContainer *
|
||||
|
@ -547,8 +547,8 @@ gimp_container_view_set_context (GimpContainerView *view,
|
|||
}
|
||||
|
||||
gint
|
||||
gimp_container_view_get_preview_size (GimpContainerView *view,
|
||||
gint *preview_border_width)
|
||||
gimp_container_view_get_view_size (GimpContainerView *view,
|
||||
gint *view_border_width)
|
||||
{
|
||||
GimpContainerViewPrivate *private;
|
||||
|
||||
|
@ -556,38 +556,38 @@ gimp_container_view_get_preview_size (GimpContainerView *view,
|
|||
|
||||
private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
|
||||
|
||||
if (preview_border_width)
|
||||
*preview_border_width = private->preview_border_width;
|
||||
if (view_border_width)
|
||||
*view_border_width = private->view_border_width;
|
||||
|
||||
return private->preview_size;
|
||||
return private->view_size;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_container_view_set_preview_size (GimpContainerView *view,
|
||||
gint preview_size,
|
||||
gint preview_border_width)
|
||||
gimp_container_view_set_view_size (GimpContainerView *view,
|
||||
gint view_size,
|
||||
gint view_border_width)
|
||||
{
|
||||
GimpContainerViewPrivate *private;
|
||||
|
||||
g_return_if_fail (GIMP_IS_CONTAINER_VIEW (view));
|
||||
g_return_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
||||
g_return_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH);
|
||||
g_return_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
||||
g_return_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH);
|
||||
|
||||
private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
|
||||
|
||||
if (private->preview_size != preview_size ||
|
||||
private->preview_border_width != preview_border_width)
|
||||
if (private->view_size != view_size ||
|
||||
private->view_border_width != view_border_width)
|
||||
{
|
||||
private->preview_size = preview_size;
|
||||
private->preview_border_width = preview_border_width;
|
||||
private->view_size = view_size;
|
||||
private->view_border_width = view_border_width;
|
||||
|
||||
GIMP_CONTAINER_VIEW_GET_INTERFACE (view)->set_preview_size (view);
|
||||
GIMP_CONTAINER_VIEW_GET_INTERFACE (view)->set_view_size (view);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (view));
|
||||
g_object_notify (G_OBJECT (view), "preview-size");
|
||||
g_object_notify (G_OBJECT (view), "preview-border-width");
|
||||
g_object_notify (G_OBJECT (view), "view-size");
|
||||
g_object_notify (G_OBJECT (view), "view-border-width");
|
||||
g_object_thaw_notify (G_OBJECT (view));
|
||||
}
|
||||
}
|
||||
|
@ -837,19 +837,19 @@ gimp_container_view_set_property (GObject *object,
|
|||
case GIMP_CONTAINER_VIEW_PROP_REORDERABLE:
|
||||
gimp_container_view_set_reorderable (view, g_value_get_boolean (value));
|
||||
break;
|
||||
case GIMP_CONTAINER_VIEW_PROP_PREVIEW_SIZE:
|
||||
case GIMP_CONTAINER_VIEW_PROP_PREVIEW_BORDER_WIDTH:
|
||||
case GIMP_CONTAINER_VIEW_PROP_VIEW_SIZE:
|
||||
case GIMP_CONTAINER_VIEW_PROP_VIEW_BORDER_WIDTH:
|
||||
{
|
||||
gint size, border;
|
||||
|
||||
size = gimp_container_view_get_preview_size (view, &border);
|
||||
size = gimp_container_view_get_view_size (view, &border);
|
||||
|
||||
if (property_id == GIMP_CONTAINER_VIEW_PROP_PREVIEW_SIZE)
|
||||
if (property_id == GIMP_CONTAINER_VIEW_PROP_VIEW_SIZE)
|
||||
size = g_value_get_int (value);
|
||||
else
|
||||
border = g_value_get_int (value);
|
||||
|
||||
gimp_container_view_set_preview_size (view, size, border);
|
||||
gimp_container_view_set_view_size (view, size, border);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -877,14 +877,14 @@ gimp_container_view_get_property (GObject *object,
|
|||
case GIMP_CONTAINER_VIEW_PROP_REORDERABLE:
|
||||
g_value_set_boolean (value, gimp_container_view_get_reorderable (view));
|
||||
break;
|
||||
case GIMP_CONTAINER_VIEW_PROP_PREVIEW_SIZE:
|
||||
case GIMP_CONTAINER_VIEW_PROP_PREVIEW_BORDER_WIDTH:
|
||||
case GIMP_CONTAINER_VIEW_PROP_VIEW_SIZE:
|
||||
case GIMP_CONTAINER_VIEW_PROP_VIEW_BORDER_WIDTH:
|
||||
{
|
||||
gint size, border;
|
||||
|
||||
size = gimp_container_view_get_preview_size (view, &border);
|
||||
size = gimp_container_view_get_view_size (view, &border);
|
||||
|
||||
if (property_id == GIMP_CONTAINER_VIEW_PROP_PREVIEW_SIZE)
|
||||
if (property_id == GIMP_CONTAINER_VIEW_PROP_VIEW_SIZE)
|
||||
g_value_set_int (value, size);
|
||||
else
|
||||
g_value_set_int (value, border);
|
||||
|
|
|
@ -29,9 +29,9 @@ typedef enum
|
|||
GIMP_CONTAINER_VIEW_PROP_CONTAINER,
|
||||
GIMP_CONTAINER_VIEW_PROP_CONTEXT,
|
||||
GIMP_CONTAINER_VIEW_PROP_REORDERABLE,
|
||||
GIMP_CONTAINER_VIEW_PROP_PREVIEW_SIZE,
|
||||
GIMP_CONTAINER_VIEW_PROP_PREVIEW_BORDER_WIDTH,
|
||||
GIMP_CONTAINER_VIEW_PROP_LAST = GIMP_CONTAINER_VIEW_PROP_PREVIEW_BORDER_WIDTH
|
||||
GIMP_CONTAINER_VIEW_PROP_VIEW_SIZE,
|
||||
GIMP_CONTAINER_VIEW_PROP_VIEW_BORDER_WIDTH,
|
||||
GIMP_CONTAINER_VIEW_PROP_LAST = GIMP_CONTAINER_VIEW_PROP_VIEW_BORDER_WIDTH
|
||||
} GimpContainerViewProp;
|
||||
|
||||
|
||||
|
@ -48,34 +48,34 @@ struct _GimpContainerViewInterface
|
|||
GTypeInterface base_iface;
|
||||
|
||||
/* signals */
|
||||
gboolean (* select_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* activate_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* context_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
gboolean (* select_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* activate_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* context_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
|
||||
/* virtual functions */
|
||||
void (* set_container) (GimpContainerView *view,
|
||||
GimpContainer *container);
|
||||
gpointer (* insert_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gint index);
|
||||
void (* remove_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* reorder_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gint new_index,
|
||||
gpointer insert_data);
|
||||
void (* rename_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* clear_items) (GimpContainerView *view);
|
||||
void (* set_preview_size) (GimpContainerView *view);
|
||||
void (* set_container) (GimpContainerView *view,
|
||||
GimpContainer *container);
|
||||
gpointer (* insert_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gint index);
|
||||
void (* remove_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* reorder_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gint new_index,
|
||||
gpointer insert_data);
|
||||
void (* rename_item) (GimpContainerView *view,
|
||||
GimpViewable *object,
|
||||
gpointer insert_data);
|
||||
void (* clear_items) (GimpContainerView *view);
|
||||
void (* set_view_size) (GimpContainerView *view);
|
||||
|
||||
/* the destroy notifier for private->hash_table's values */
|
||||
GDestroyNotify insert_data_free;
|
||||
|
@ -92,11 +92,11 @@ GimpContext * gimp_container_view_get_context (GimpContainerView *view);
|
|||
void gimp_container_view_set_context (GimpContainerView *view,
|
||||
GimpContext *context);
|
||||
|
||||
gint gimp_container_view_get_preview_size (GimpContainerView *view,
|
||||
gint *preview_border_width);
|
||||
void gimp_container_view_set_preview_size (GimpContainerView *view,
|
||||
gint preview_size,
|
||||
gint preview_border_width);
|
||||
gint gimp_container_view_get_view_size (GimpContainerView *view,
|
||||
gint *view_border_width);
|
||||
void gimp_container_view_set_view_size (GimpContainerView *view,
|
||||
gint view_size,
|
||||
gint view_border_width);
|
||||
|
||||
gboolean gimp_container_view_get_reorderable (GimpContainerView *view);
|
||||
void gimp_container_view_set_reorderable (GimpContainerView *view,
|
||||
|
|
|
@ -86,8 +86,8 @@ GtkWidget *
|
|||
gimp_data_factory_view_new (GimpViewType view_type,
|
||||
GimpDataFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_identifier,
|
||||
|
@ -101,8 +101,8 @@ gimp_data_factory_view_new (GimpViewType view_type,
|
|||
view_type,
|
||||
factory,
|
||||
context,
|
||||
preview_size,
|
||||
preview_border_width,
|
||||
view_size,
|
||||
view_border_width,
|
||||
menu_factory,
|
||||
menu_identifier,
|
||||
ui_identifier,
|
||||
|
@ -120,8 +120,8 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||
GimpViewType view_type,
|
||||
GimpDataFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_identifier,
|
||||
|
@ -132,10 +132,10 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_DATA_FACTORY_VIEW (factory_view), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), FALSE);
|
||||
g_return_val_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
||||
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
FALSE);
|
||||
|
||||
factory_view->factory = factory;
|
||||
|
@ -143,7 +143,7 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (factory_view),
|
||||
view_type,
|
||||
factory->container, context,
|
||||
preview_size, preview_border_width,
|
||||
view_size, view_border_width,
|
||||
menu_factory, menu_identifier,
|
||||
ui_identifier))
|
||||
{
|
||||
|
|
|
@ -60,8 +60,8 @@ GType gimp_data_factory_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_data_factory_view_new (GimpViewType view_type,
|
||||
GimpDataFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_identifier,
|
||||
|
@ -74,8 +74,8 @@ gboolean gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||
GimpViewType view_type,
|
||||
GimpDataFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_identifier,
|
||||
|
|
|
@ -94,7 +94,7 @@ static void gimp_device_status_update_entry (GimpDeviceInfo *device_in
|
|||
GimpDeviceStatusEntry *entry);
|
||||
static void gimp_device_status_save_clicked (GtkWidget *button,
|
||||
GimpDeviceStatus *status);
|
||||
static void gimp_device_status_preview_clicked (GtkWidget *widget,
|
||||
static void gimp_device_status_view_clicked (GtkWidget *widget,
|
||||
GdkModifierType state,
|
||||
const gchar *identifier);
|
||||
|
||||
|
@ -287,15 +287,15 @@ gimp_device_status_device_add (GimpContainer *devices,
|
|||
|
||||
/* the tool */
|
||||
|
||||
entry->tool = gimp_prop_preview_new (G_OBJECT (context),
|
||||
"tool", CELL_SIZE);
|
||||
entry->tool = gimp_prop_view_new (G_OBJECT (context),
|
||||
"tool", CELL_SIZE);
|
||||
GIMP_VIEW (entry->tool)->clickable = TRUE;
|
||||
gtk_table_attach (GTK_TABLE (entry->table), entry->tool,
|
||||
1, 2, 1, 2, 0, 0, 0, 0);
|
||||
gtk_widget_show (entry->tool);
|
||||
|
||||
g_signal_connect (entry->tool, "clicked",
|
||||
G_CALLBACK (gimp_device_status_preview_clicked),
|
||||
G_CALLBACK (gimp_device_status_view_clicked),
|
||||
"gimp-tool-list|gimp-tool-grid");
|
||||
|
||||
/* the foreground color */
|
||||
|
@ -324,8 +324,8 @@ gimp_device_status_device_add (GimpContainer *devices,
|
|||
|
||||
/* the brush */
|
||||
|
||||
entry->brush = gimp_prop_preview_new (G_OBJECT (context),
|
||||
"brush", CELL_SIZE);
|
||||
entry->brush = gimp_prop_view_new (G_OBJECT (context),
|
||||
"brush", CELL_SIZE);
|
||||
GIMP_VIEW (entry->brush)->clickable = TRUE;
|
||||
GIMP_VIEW (entry->brush)->show_popup = TRUE;
|
||||
gtk_table_attach (GTK_TABLE (entry->table), entry->brush,
|
||||
|
@ -333,13 +333,13 @@ gimp_device_status_device_add (GimpContainer *devices,
|
|||
gtk_widget_show (entry->brush);
|
||||
|
||||
g_signal_connect (entry->brush, "clicked",
|
||||
G_CALLBACK (gimp_device_status_preview_clicked),
|
||||
G_CALLBACK (gimp_device_status_view_clicked),
|
||||
"gimp-brush-grid|gimp-brush-list");
|
||||
|
||||
/* the pattern */
|
||||
|
||||
entry->pattern = gimp_prop_preview_new (G_OBJECT (context),
|
||||
"pattern", CELL_SIZE);
|
||||
entry->pattern = gimp_prop_view_new (G_OBJECT (context),
|
||||
"pattern", CELL_SIZE);
|
||||
GIMP_VIEW (entry->pattern)->clickable = TRUE;
|
||||
GIMP_VIEW (entry->pattern)->show_popup = TRUE;
|
||||
gtk_table_attach (GTK_TABLE (entry->table), entry->pattern,
|
||||
|
@ -347,13 +347,13 @@ gimp_device_status_device_add (GimpContainer *devices,
|
|||
gtk_widget_show (entry->pattern);
|
||||
|
||||
g_signal_connect (entry->pattern, "clicked",
|
||||
G_CALLBACK (gimp_device_status_preview_clicked),
|
||||
G_CALLBACK (gimp_device_status_view_clicked),
|
||||
"gimp-pattern-grid|gimp-pattern-list");
|
||||
|
||||
/* the gradient */
|
||||
|
||||
entry->gradient = gimp_prop_preview_new (G_OBJECT (context),
|
||||
"gradient", 2 * CELL_SIZE);
|
||||
entry->gradient = gimp_prop_view_new (G_OBJECT (context),
|
||||
"gradient", 2 * CELL_SIZE);
|
||||
GIMP_VIEW (entry->gradient)->clickable = TRUE;
|
||||
GIMP_VIEW (entry->gradient)->show_popup = TRUE;
|
||||
gtk_table_attach (GTK_TABLE (entry->table), entry->gradient,
|
||||
|
@ -361,7 +361,7 @@ gimp_device_status_device_add (GimpContainer *devices,
|
|||
gtk_widget_show (entry->gradient);
|
||||
|
||||
g_signal_connect (entry->gradient, "clicked",
|
||||
G_CALLBACK (gimp_device_status_preview_clicked),
|
||||
G_CALLBACK (gimp_device_status_view_clicked),
|
||||
"gimp-gradient-list|gimp-gradient-grid");
|
||||
|
||||
gimp_device_status_update_entry (device_info, entry);
|
||||
|
@ -463,9 +463,9 @@ gimp_device_status_save_clicked (GtkWidget *button,
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_device_status_preview_clicked (GtkWidget *widget,
|
||||
GdkModifierType state,
|
||||
const gchar *identifier)
|
||||
gimp_device_status_view_clicked (GtkWidget *widget,
|
||||
GdkModifierType state,
|
||||
const gchar *identifier)
|
||||
{
|
||||
GimpDialogFactory *dialog_factory;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static GtkWidget *
|
|||
gimp_dialog_factory_default_constructor (GimpDialogFactory *factory,
|
||||
GimpDialogFactoryEntry *entry,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
static void gimp_dialog_factory_set_widget_data (GtkWidget *dialog,
|
||||
GimpDialogFactory *factory,
|
||||
GimpDialogFactoryEntry *entry);
|
||||
|
@ -273,7 +273,7 @@ gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
|||
const gchar *stock_id,
|
||||
const gchar *help_id,
|
||||
GimpDialogNewFunc new_func,
|
||||
gint preview_size,
|
||||
gint view_size,
|
||||
gboolean singleton,
|
||||
gboolean session_managed,
|
||||
gboolean remember_size,
|
||||
|
@ -292,7 +292,7 @@ gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
|||
entry->stock_id = g_strdup (stock_id);
|
||||
entry->help_id = g_strdup (help_id);
|
||||
entry->new_func = new_func;
|
||||
entry->preview_size = preview_size;
|
||||
entry->view_size = view_size;
|
||||
entry->singleton = singleton ? TRUE : FALSE;
|
||||
entry->session_managed = session_managed ? TRUE : FALSE;
|
||||
entry->remember_size = remember_size ? TRUE : FALSE;
|
||||
|
@ -352,7 +352,7 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
|||
GdkScreen *screen,
|
||||
GimpContext *context,
|
||||
const gchar *identifier,
|
||||
gint preview_size,
|
||||
gint view_size,
|
||||
gboolean return_existing,
|
||||
gboolean present)
|
||||
{
|
||||
|
@ -418,21 +418,21 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
|||
* - the factory's context, which happens when raising a toplevel
|
||||
* dialog was the original request.
|
||||
*/
|
||||
if (preview_size < GIMP_VIEW_SIZE_TINY)
|
||||
preview_size = entry->preview_size;
|
||||
if (view_size < GIMP_VIEW_SIZE_TINY)
|
||||
view_size = entry->view_size;
|
||||
|
||||
if (context)
|
||||
dialog = factory->constructor (factory, entry,
|
||||
context,
|
||||
preview_size);
|
||||
view_size);
|
||||
else if (dock)
|
||||
dialog = factory->constructor (factory, entry,
|
||||
GIMP_DOCK (dock)->context,
|
||||
preview_size);
|
||||
view_size);
|
||||
else
|
||||
dialog = factory->constructor (factory, entry,
|
||||
factory->context,
|
||||
preview_size);
|
||||
view_size);
|
||||
|
||||
if (dialog)
|
||||
{
|
||||
|
@ -530,7 +530,7 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
|||
* @screen: the #GdkScreen the dialog should appear on
|
||||
* @identifier: the identifier of the dialog as registered with
|
||||
* gimp_dialog_factory_register_entry()
|
||||
* @preview_size:
|
||||
* @view_size:
|
||||
* @present: whether gtk_window_present() should be called
|
||||
*
|
||||
* Creates a new toplevel dialog or a #GimpDockable, depending on whether
|
||||
|
@ -543,7 +543,7 @@ GtkWidget *
|
|||
gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
const gchar *identifier,
|
||||
gint preview_size,
|
||||
gint view_size,
|
||||
gboolean present)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||
|
@ -554,7 +554,7 @@ gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
|||
screen,
|
||||
factory->context,
|
||||
identifier,
|
||||
preview_size,
|
||||
view_size,
|
||||
FALSE,
|
||||
present);
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
|||
* @screen: the #GdkScreen the dialog should appear on
|
||||
* @identifiers: a '|' separated list of identifiers of dialogs as
|
||||
* registered with gimp_dialog_factory_register_entry()
|
||||
* @preview_size:
|
||||
* @view_size:
|
||||
*
|
||||
* Raises any of a list of already existing toplevel dialog or
|
||||
* #GimpDockable if it was already created by this %facory.
|
||||
|
@ -579,7 +579,7 @@ GtkWidget *
|
|||
gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
const gchar *identifiers,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
|
@ -608,7 +608,7 @@ gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
|||
screen,
|
||||
NULL,
|
||||
ids[i] ? ids[i] : ids[0],
|
||||
preview_size,
|
||||
view_size,
|
||||
TRUE,
|
||||
TRUE);
|
||||
g_strfreev (ids);
|
||||
|
@ -619,7 +619,7 @@ gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
|||
screen,
|
||||
NULL,
|
||||
identifiers,
|
||||
preview_size,
|
||||
view_size,
|
||||
TRUE,
|
||||
TRUE);
|
||||
}
|
||||
|
@ -633,7 +633,7 @@ gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
|||
* @dock: a #GimpDock crated by this %factory.
|
||||
* @identifier: the identifier of the dialog as registered with
|
||||
* gimp_dialog_factory_register_entry()
|
||||
* @preview_size:
|
||||
* @view_size:
|
||||
*
|
||||
* Creates a new #GimpDockable in the context of the #GimpDock it will be
|
||||
* added to.
|
||||
|
@ -649,7 +649,7 @@ GtkWidget *
|
|||
gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
|
||||
GimpDock *dock,
|
||||
const gchar *identifier,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
|
||||
|
@ -659,7 +659,7 @@ gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
|
|||
gtk_widget_get_screen (GTK_WIDGET (dock)),
|
||||
dock->context,
|
||||
identifier,
|
||||
preview_size,
|
||||
view_size,
|
||||
FALSE,
|
||||
FALSE);
|
||||
}
|
||||
|
@ -1122,9 +1122,9 @@ static GtkWidget *
|
|||
gimp_dialog_factory_default_constructor (GimpDialogFactory *factory,
|
||||
GimpDialogFactoryEntry *entry,
|
||||
GimpContext *context,
|
||||
gint preview_size)
|
||||
gint view_size)
|
||||
{
|
||||
return entry->new_func (factory, context, preview_size);
|
||||
return entry->new_func (factory, context, view_size);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -37,11 +37,11 @@ typedef enum
|
|||
|
||||
typedef GtkWidget * (* GimpDialogNewFunc) (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
typedef GtkWidget * (* GimpDialogConstructor) (GimpDialogFactory *factory,
|
||||
GimpDialogFactoryEntry *entry,
|
||||
GimpContext *context,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
|
||||
|
||||
struct _GimpDialogFactoryEntry
|
||||
|
@ -53,7 +53,7 @@ struct _GimpDialogFactoryEntry
|
|||
gchar *help_id;
|
||||
|
||||
GimpDialogNewFunc new_func;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
gboolean singleton;
|
||||
gboolean session_managed;
|
||||
|
@ -116,7 +116,7 @@ void gimp_dialog_factory_register_entry (GimpDialogFactory *factory,
|
|||
const gchar *stock_id,
|
||||
const gchar *help_id,
|
||||
GimpDialogNewFunc new_func,
|
||||
gint preview_size,
|
||||
gint view_size,
|
||||
gboolean singleton,
|
||||
gboolean session_managed,
|
||||
gboolean remember_size,
|
||||
|
@ -132,16 +132,16 @@ GimpSessionInfo * gimp_dialog_factory_find_session_info
|
|||
GtkWidget * gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
const gchar *identifier,
|
||||
gint preview_size,
|
||||
gint view_size,
|
||||
gboolean present);
|
||||
GtkWidget * gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
const gchar *identifiers,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
|
||||
GimpDock *dock,
|
||||
const gchar *identifier,
|
||||
gint preview_size);
|
||||
gint view_size);
|
||||
GtkWidget * gimp_dialog_factory_dock_new (GimpDialogFactory *factory,
|
||||
GdkScreen *screen);
|
||||
|
||||
|
|
|
@ -74,8 +74,8 @@ GtkWidget *
|
|||
gimp_document_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory)
|
||||
{
|
||||
GimpDocumentView *document_view;
|
||||
|
@ -86,7 +86,7 @@ gimp_document_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (document_view),
|
||||
view_type,
|
||||
container, context,
|
||||
preview_size, preview_border_width,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Documents>",
|
||||
"/documents-popup"))
|
||||
{
|
||||
|
|
|
@ -56,8 +56,8 @@ GType gimp_document_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_document_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -66,8 +66,8 @@ GtkWidget *
|
|||
gimp_font_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory)
|
||||
{
|
||||
GimpFontView *font_view;
|
||||
|
@ -78,7 +78,7 @@ gimp_font_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (font_view),
|
||||
view_type,
|
||||
container,context,
|
||||
preview_size, preview_border_width,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Fonts>",
|
||||
"/fonts-popup"))
|
||||
{
|
||||
|
|
|
@ -54,8 +54,8 @@ GType gimp_font_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_font_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -284,32 +284,32 @@ gimp_gradient_editor_init (GimpGradientEditor *editor)
|
|||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* Gradient preview */
|
||||
editor->preview_last_x = 0;
|
||||
editor->preview_button_down = FALSE;
|
||||
/* Gradient view */
|
||||
editor->view_last_x = 0;
|
||||
editor->view_button_down = FALSE;
|
||||
|
||||
editor->preview = gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_GRADIENT,
|
||||
GRAD_VIEW_WIDTH,
|
||||
GRAD_VIEW_HEIGHT, 0,
|
||||
FALSE, FALSE, FALSE);
|
||||
gtk_widget_set_size_request (editor->preview,
|
||||
editor->view = gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_GRADIENT,
|
||||
GRAD_VIEW_WIDTH,
|
||||
GRAD_VIEW_HEIGHT, 0,
|
||||
FALSE, FALSE, FALSE);
|
||||
gtk_widget_set_size_request (editor->view,
|
||||
GRAD_VIEW_WIDTH, GRAD_VIEW_HEIGHT);
|
||||
gtk_widget_set_events (editor->preview, GRAD_VIEW_EVENT_MASK);
|
||||
gimp_view_set_expand (GIMP_VIEW (editor->preview), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), editor->preview, TRUE, TRUE, 0);
|
||||
gtk_widget_show (editor->preview);
|
||||
gtk_widget_set_events (editor->view, GRAD_VIEW_EVENT_MASK);
|
||||
gimp_view_set_expand (GIMP_VIEW (editor->view), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), editor->view, TRUE, TRUE, 0);
|
||||
gtk_widget_show (editor->view);
|
||||
|
||||
g_signal_connect (editor->preview, "event",
|
||||
g_signal_connect (editor->view, "event",
|
||||
G_CALLBACK (view_events),
|
||||
editor);
|
||||
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (editor->preview),
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (editor->view),
|
||||
GIMP_TYPE_GRADIENT,
|
||||
gradient_editor_drop_gradient,
|
||||
editor);
|
||||
|
||||
gimp_dnd_color_dest_add (GTK_WIDGET (editor->preview),
|
||||
gimp_dnd_color_dest_add (GTK_WIDGET (editor->view),
|
||||
gradient_editor_drop_color,
|
||||
editor);
|
||||
|
||||
|
@ -493,7 +493,7 @@ gimp_gradient_editor_set_data (GimpDataEditor *editor,
|
|||
G_CALLBACK (gimp_gradient_editor_gradient_dirty),
|
||||
gradient_editor);
|
||||
|
||||
gimp_view_set_viewable (GIMP_VIEW (gradient_editor->preview),
|
||||
gimp_view_set_viewable (GIMP_VIEW (gradient_editor->view),
|
||||
GIMP_VIEWABLE (data));
|
||||
|
||||
gtk_widget_set_sensitive (gradient_editor->control, editor->data_editable);
|
||||
|
@ -741,7 +741,7 @@ gradient_editor_scrollbar_update (GtkAdjustment *adjustment,
|
|||
g_free (str1);
|
||||
g_free (str2);
|
||||
|
||||
renderer = GIMP_VIEW_RENDERER_GRADIENT (GIMP_VIEW (editor->preview)->renderer);
|
||||
renderer = GIMP_VIEW_RENDERER_GRADIENT (GIMP_VIEW (editor->view)->renderer);
|
||||
|
||||
gimp_view_renderer_gradient_set_offsets (renderer,
|
||||
adjustment->value,
|
||||
|
@ -806,13 +806,13 @@ view_events (GtkWidget *widget,
|
|||
{
|
||||
GdkEventMotion *mevent = (GdkEventMotion *) event;
|
||||
|
||||
gtk_widget_get_pointer (editor->preview, &x, &y);
|
||||
gtk_widget_get_pointer (editor->view, &x, &y);
|
||||
|
||||
if (x != editor->preview_last_x)
|
||||
if (x != editor->view_last_x)
|
||||
{
|
||||
editor->preview_last_x = x;
|
||||
editor->view_last_x = x;
|
||||
|
||||
if (editor->preview_button_down)
|
||||
if (editor->view_button_down)
|
||||
{
|
||||
if (mevent->state & GDK_CONTROL_MASK)
|
||||
view_set_background (editor, x);
|
||||
|
@ -831,13 +831,13 @@ view_events (GtkWidget *widget,
|
|||
{
|
||||
GdkEventButton *bevent = (GdkEventButton *) event;
|
||||
|
||||
gtk_widget_get_pointer (editor->preview, &x, &y);
|
||||
gtk_widget_get_pointer (editor->view, &x, &y);
|
||||
|
||||
switch (bevent->button)
|
||||
{
|
||||
case 1:
|
||||
editor->preview_last_x = x;
|
||||
editor->preview_button_down = TRUE;
|
||||
editor->view_last_x = x;
|
||||
editor->view_button_down = TRUE;
|
||||
if (bevent->state & GDK_CONTROL_MASK)
|
||||
view_set_background (editor, x);
|
||||
else
|
||||
|
@ -902,14 +902,14 @@ view_events (GtkWidget *widget,
|
|||
break;
|
||||
|
||||
case GDK_BUTTON_RELEASE:
|
||||
if (editor->preview_button_down)
|
||||
if (editor->view_button_down)
|
||||
{
|
||||
GdkEventButton *bevent = (GdkEventButton *) event;
|
||||
|
||||
gtk_widget_get_pointer (editor->preview, &x, &y);
|
||||
gtk_widget_get_pointer (editor->view, &x, &y);
|
||||
|
||||
editor->preview_last_x = x;
|
||||
editor->preview_button_down = FALSE;
|
||||
editor->view_last_x = x;
|
||||
editor->view_button_down = FALSE;
|
||||
if (bevent->state & GDK_CONTROL_MASK)
|
||||
view_set_background (editor, x);
|
||||
else
|
||||
|
@ -1708,7 +1708,7 @@ control_update (GimpGradientEditor *editor,
|
|||
/* See whether we have to re-create the control pixmap
|
||||
* depending on the view's width
|
||||
*/
|
||||
cwidth = editor->preview->allocation.width;
|
||||
cwidth = editor->view->allocation.width;
|
||||
cheight = GRAD_CONTROL_HEIGHT;
|
||||
|
||||
if (editor->control_pixmap)
|
||||
|
|
|
@ -57,7 +57,7 @@ struct _GimpGradientEditor
|
|||
GtkWidget *hint_label3;
|
||||
GtkWidget *hint_label4;
|
||||
GtkWidget *scrollbar;
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
GtkWidget *control;
|
||||
|
||||
/* Zoom and scrollbar */
|
||||
|
@ -70,9 +70,9 @@ struct _GimpGradientEditor
|
|||
/* Color dialog */
|
||||
GtkWidget *color_dialog;
|
||||
|
||||
/* Gradient preview */
|
||||
gint preview_last_x;
|
||||
gboolean preview_button_down;
|
||||
/* Gradient view */
|
||||
gint view_last_x;
|
||||
gboolean view_button_down;
|
||||
|
||||
/* Gradient control */
|
||||
GdkPixmap *control_pixmap;
|
||||
|
|
|
@ -69,8 +69,8 @@ GtkWidget *
|
|||
gimp_image_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory)
|
||||
{
|
||||
GimpImageView *image_view;
|
||||
|
@ -81,7 +81,7 @@ gimp_image_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (image_view),
|
||||
view_type,
|
||||
container, context,
|
||||
preview_size, preview_border_width,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Images>",
|
||||
"/images-popup"))
|
||||
{
|
||||
|
|
|
@ -56,8 +56,8 @@ GType gimp_image_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_image_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -430,8 +430,8 @@ gimp_item_tree_view_destroy (GtkObject *object)
|
|||
|
||||
GtkWidget *
|
||||
gimp_item_tree_view_new (GType view_type,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpImage *gimage,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
|
@ -440,10 +440,10 @@ gimp_item_tree_view_new (GType view_type,
|
|||
GimpItemTreeView *item_view;
|
||||
|
||||
g_return_val_if_fail (g_type_is_a (view_type, GIMP_TYPE_ITEM_TREE_VIEW), NULL);
|
||||
g_return_val_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
NULL);
|
||||
g_return_val_if_fail (gimage == NULL || GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
|
||||
|
@ -457,8 +457,8 @@ gimp_item_tree_view_new (GType view_type,
|
|||
"ui-path", ui_path,
|
||||
NULL);
|
||||
|
||||
gimp_container_view_set_preview_size (GIMP_CONTAINER_VIEW (item_view),
|
||||
preview_size, preview_border_width);
|
||||
gimp_container_view_set_view_size (GIMP_CONTAINER_VIEW (item_view),
|
||||
view_size, view_border_width);
|
||||
|
||||
gimp_item_tree_view_set_image (item_view, gimage);
|
||||
|
||||
|
@ -811,12 +811,12 @@ gimp_item_tree_view_size_changed (GimpImage *gimage,
|
|||
GimpItemTreeView *tree_view)
|
||||
{
|
||||
GimpContainerView *view = GIMP_CONTAINER_VIEW (tree_view);
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
gimp_container_view_set_preview_size (view, preview_size, border_width);
|
||||
gimp_container_view_set_view_size (view, view_size, border_width);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -118,8 +118,8 @@ struct _GimpItemTreeViewClass
|
|||
GType gimp_item_tree_view_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gimp_item_tree_view_new (GType view_type,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpImage *gimage,
|
||||
GimpMenuFactory *menu_facotry,
|
||||
const gchar *menu_identifier,
|
||||
|
|
|
@ -77,7 +77,7 @@ static gpointer gimp_layer_tree_view_insert_item (GimpContainerView *view,
|
|||
static gboolean gimp_layer_tree_view_select_item (GimpContainerView *view,
|
||||
GimpViewable *item,
|
||||
gpointer insert_data);
|
||||
static void gimp_layer_tree_view_set_preview_size (GimpContainerView *view);
|
||||
static void gimp_layer_tree_view_set_view_size (GimpContainerView *view);
|
||||
|
||||
static gboolean gimp_layer_tree_view_drop_possible(GimpContainerTreeView *view,
|
||||
GimpDndType src_type,
|
||||
|
@ -332,10 +332,10 @@ gimp_layer_tree_view_view_iface_init (GimpContainerViewInterface *iface)
|
|||
{
|
||||
parent_view_iface = g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->set_container = gimp_layer_tree_view_set_container;
|
||||
iface->insert_item = gimp_layer_tree_view_insert_item;
|
||||
iface->select_item = gimp_layer_tree_view_select_item;
|
||||
iface->set_preview_size = gimp_layer_tree_view_set_preview_size;
|
||||
iface->set_container = gimp_layer_tree_view_set_container;
|
||||
iface->insert_item = gimp_layer_tree_view_insert_item;
|
||||
iface->select_item = gimp_layer_tree_view_select_item;
|
||||
iface->set_view_size = gimp_layer_tree_view_set_view_size;
|
||||
}
|
||||
|
||||
static GObject *
|
||||
|
@ -580,7 +580,7 @@ gimp_layer_tree_view_select_item (GimpContainerView *view,
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_layer_tree_view_set_preview_size (GimpContainerView *view)
|
||||
gimp_layer_tree_view_set_view_size (GimpContainerView *view)
|
||||
{
|
||||
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
|
||||
|
||||
|
@ -589,10 +589,10 @@ gimp_layer_tree_view_set_preview_size (GimpContainerView *view)
|
|||
GimpLayerTreeView *layer_view = GIMP_LAYER_TREE_VIEW (view);
|
||||
GtkTreeIter iter;
|
||||
gboolean iter_valid;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
for (iter_valid = gtk_tree_model_get_iter_first (tree_view->model, &iter);
|
||||
iter_valid;
|
||||
|
@ -606,14 +606,13 @@ gimp_layer_tree_view_set_preview_size (GimpContainerView *view)
|
|||
|
||||
if (renderer)
|
||||
{
|
||||
gimp_view_renderer_set_size (renderer,
|
||||
preview_size, border_width);
|
||||
gimp_view_renderer_set_size (renderer, view_size, border_width);
|
||||
g_object_unref (renderer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parent_view_iface->set_preview_size (view);
|
||||
parent_view_iface->set_view_size (view);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1137,15 +1136,15 @@ gimp_layer_tree_view_mask_update (GimpLayerTreeView *layer_view,
|
|||
if (mask)
|
||||
{
|
||||
GClosure *closure;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
gint border_width;
|
||||
|
||||
preview_size = gimp_container_view_get_preview_size (view, &border_width);
|
||||
view_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
mask_visible = TRUE;
|
||||
|
||||
renderer = gimp_view_renderer_new (G_TYPE_FROM_INSTANCE (mask),
|
||||
preview_size, border_width,
|
||||
view_size, border_width,
|
||||
FALSE);
|
||||
gimp_view_renderer_set_viewable (renderer, GIMP_VIEWABLE (mask));
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
#define DEFAULT_MINIMAL_WIDTH 250
|
||||
#define DEFAULT_MENU_PREVIEW_SIZE GTK_ICON_SIZE_SMALL_TOOLBAR
|
||||
#define DEFAULT_MINIMAL_WIDTH 250
|
||||
#define DEFAULT_MENU_VIEW_SIZE GTK_ICON_SIZE_SMALL_TOOLBAR
|
||||
|
||||
|
||||
static GObject * gimp_menu_dock_constructor (GType type,
|
||||
|
@ -124,7 +124,7 @@ gimp_menu_dock_class_init (GimpMenuDockClass *klass)
|
|||
g_param_spec_enum ("menu-preview-size",
|
||||
NULL, NULL,
|
||||
GTK_TYPE_ICON_SIZE,
|
||||
DEFAULT_MENU_PREVIEW_SIZE,
|
||||
DEFAULT_MENU_VIEW_SIZE,
|
||||
G_PARAM_READABLE));
|
||||
}
|
||||
|
||||
|
@ -219,10 +219,10 @@ gimp_menu_dock_style_set (GtkWidget *widget,
|
|||
{
|
||||
GimpMenuDock *menu_dock;
|
||||
gint minimal_width;
|
||||
GtkIconSize menu_preview_size;
|
||||
GtkIconSize menu_view_size;
|
||||
GtkSettings *settings;
|
||||
gint menu_preview_width = 18;
|
||||
gint menu_preview_height = 18;
|
||||
gint menu_view_width = 18;
|
||||
gint menu_view_height = 18;
|
||||
gint focus_line_width;
|
||||
gint focus_padding;
|
||||
gint ythickness;
|
||||
|
@ -234,14 +234,14 @@ gimp_menu_dock_style_set (GtkWidget *widget,
|
|||
|
||||
gtk_widget_style_get (widget,
|
||||
"minimal-width", &minimal_width,
|
||||
"menu-preview-size", &menu_preview_size,
|
||||
"menu-preview-size", &menu_view_size,
|
||||
NULL);
|
||||
|
||||
settings = gtk_widget_get_settings (menu_dock->image_combo);
|
||||
gtk_icon_size_lookup_for_settings (settings,
|
||||
menu_preview_size,
|
||||
&menu_preview_width,
|
||||
&menu_preview_height);
|
||||
menu_view_size,
|
||||
&menu_view_width,
|
||||
&menu_view_height);
|
||||
|
||||
gtk_widget_style_get (menu_dock->auto_button,
|
||||
"focus-line-width", &focus_line_width,
|
||||
|
@ -252,11 +252,11 @@ gimp_menu_dock_style_set (GtkWidget *widget,
|
|||
|
||||
gtk_widget_set_size_request (widget, minimal_width, -1);
|
||||
|
||||
gimp_container_view_set_preview_size (GIMP_CONTAINER_VIEW (menu_dock->image_combo),
|
||||
menu_preview_height, 1);
|
||||
gimp_container_view_set_view_size (GIMP_CONTAINER_VIEW (menu_dock->image_combo),
|
||||
menu_view_height, 1);
|
||||
|
||||
gtk_widget_set_size_request (menu_dock->auto_button, -1,
|
||||
menu_preview_height +
|
||||
menu_view_height +
|
||||
2 * (1 /* CHILD_SPACING */ +
|
||||
ythickness +
|
||||
focus_padding +
|
||||
|
@ -375,8 +375,8 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory,
|
|||
GimpMenuDock *menu_dock;
|
||||
GimpContext *context;
|
||||
GtkSettings *settings;
|
||||
gint menu_preview_width;
|
||||
gint menu_preview_height;
|
||||
gint menu_view_width;
|
||||
gint menu_view_height;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (dialog_factory), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (image_container), NULL);
|
||||
|
@ -429,9 +429,9 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory,
|
|||
|
||||
settings = gtk_widget_get_settings (GTK_WIDGET (menu_dock));
|
||||
gtk_icon_size_lookup_for_settings (settings,
|
||||
DEFAULT_MENU_PREVIEW_SIZE,
|
||||
&menu_preview_width,
|
||||
&menu_preview_height);
|
||||
DEFAULT_MENU_VIEW_SIZE,
|
||||
&menu_view_width,
|
||||
&menu_view_height);
|
||||
|
||||
g_object_set (menu_dock->image_combo,
|
||||
"container", image_container,
|
||||
|
|
|
@ -54,17 +54,17 @@ GtkWidget *
|
|||
gimp_pattern_factory_view_new (GimpViewType view_type,
|
||||
GimpDataFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory)
|
||||
{
|
||||
GimpPatternFactoryView *factory_view;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), NULL);
|
||||
g_return_val_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, NULL);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
NULL);
|
||||
|
||||
factory_view = g_object_new (GIMP_TYPE_PATTERN_FACTORY_VIEW, NULL);
|
||||
|
@ -73,7 +73,7 @@ gimp_pattern_factory_view_new (GimpViewType view_type,
|
|||
view_type,
|
||||
factory,
|
||||
context,
|
||||
preview_size, preview_border_width,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Patterns>",
|
||||
"/patterns-popup",
|
||||
"patterns"))
|
||||
|
|
|
@ -51,8 +51,8 @@ GType gimp_pattern_factory_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_pattern_factory_view_new (GimpViewType view_type,
|
||||
GimpDataFactory *factory,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -282,20 +282,20 @@ gimp_prop_color_button_notify (GObject *config,
|
|||
|
||||
|
||||
/*************/
|
||||
/* preview */
|
||||
/* view */
|
||||
/*************/
|
||||
|
||||
static void gimp_prop_preview_drop (GtkWidget *menu,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_prop_preview_notify (GObject *config,
|
||||
GParamSpec *param_spec,
|
||||
GtkWidget *preview);
|
||||
static void gimp_prop_view_drop (GtkWidget *menu,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
static void gimp_prop_view_notify (GObject *config,
|
||||
GParamSpec *param_spec,
|
||||
GtkWidget *view);
|
||||
|
||||
/**
|
||||
* gimp_prop_preview_new:
|
||||
* gimp_prop_view_new:
|
||||
* @config: #GimpConfig object to which property is attached.
|
||||
* @property_name: Name of Unit property.
|
||||
* @size: Width and height of preview display.
|
||||
|
@ -307,12 +307,12 @@ static void gimp_prop_preview_notify (GObject *config,
|
|||
* Since GIMP 2.4
|
||||
*/
|
||||
GtkWidget *
|
||||
gimp_prop_preview_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
gint size)
|
||||
gimp_prop_view_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
gint size)
|
||||
{
|
||||
GParamSpec *param_spec;
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
GimpViewable *viewable;
|
||||
|
||||
param_spec = check_param_spec (config, property_name,
|
||||
|
@ -328,13 +328,13 @@ gimp_prop_preview_new (GObject *config,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
preview = gimp_view_new_by_types (GIMP_TYPE_VIEW,
|
||||
param_spec->value_type,
|
||||
size, 0, FALSE);
|
||||
view = gimp_view_new_by_types (GIMP_TYPE_VIEW,
|
||||
param_spec->value_type,
|
||||
size, 0, FALSE);
|
||||
|
||||
if (! preview)
|
||||
if (! view)
|
||||
{
|
||||
g_warning ("%s: cannot create preview for type '%s'",
|
||||
g_warning ("%s: cannot create view for type '%s'",
|
||||
G_STRFUNC, g_type_name (param_spec->value_type));
|
||||
return NULL;
|
||||
}
|
||||
|
@ -345,34 +345,34 @@ gimp_prop_preview_new (GObject *config,
|
|||
|
||||
if (viewable)
|
||||
{
|
||||
gimp_view_set_viewable (GIMP_VIEW (preview), viewable);
|
||||
gimp_view_set_viewable (GIMP_VIEW (view), viewable);
|
||||
g_object_unref (viewable);
|
||||
}
|
||||
|
||||
set_param_spec (G_OBJECT (preview), preview, param_spec);
|
||||
set_param_spec (G_OBJECT (view), view, param_spec);
|
||||
|
||||
gimp_dnd_viewable_dest_add (preview, param_spec->value_type,
|
||||
gimp_prop_preview_drop,
|
||||
gimp_dnd_viewable_dest_add (view, param_spec->value_type,
|
||||
gimp_prop_view_drop,
|
||||
config);
|
||||
|
||||
connect_notify (config, property_name,
|
||||
G_CALLBACK (gimp_prop_preview_notify),
|
||||
preview);
|
||||
G_CALLBACK (gimp_prop_view_notify),
|
||||
view);
|
||||
|
||||
return preview;
|
||||
return view;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_prop_preview_drop (GtkWidget *preview,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
gimp_prop_view_drop (GtkWidget *view,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
GObject *config;
|
||||
GParamSpec *param_spec;
|
||||
|
||||
param_spec = get_param_spec (G_OBJECT (preview));
|
||||
param_spec = get_param_spec (G_OBJECT (view));
|
||||
if (! param_spec)
|
||||
return;
|
||||
|
||||
|
@ -384,9 +384,9 @@ gimp_prop_preview_drop (GtkWidget *preview,
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_prop_preview_notify (GObject *config,
|
||||
GParamSpec *param_spec,
|
||||
GtkWidget *preview)
|
||||
gimp_prop_view_notify (GObject *config,
|
||||
GParamSpec *param_spec,
|
||||
GtkWidget *view)
|
||||
{
|
||||
GimpViewable *viewable;
|
||||
|
||||
|
@ -394,7 +394,7 @@ gimp_prop_preview_notify (GObject *config,
|
|||
param_spec->name, &viewable,
|
||||
NULL);
|
||||
|
||||
gimp_view_set_viewable (GIMP_VIEW (preview), viewable);
|
||||
gimp_view_set_viewable (GIMP_VIEW (view), viewable);
|
||||
|
||||
if (viewable)
|
||||
g_object_unref (viewable);
|
||||
|
|
|
@ -25,26 +25,26 @@
|
|||
|
||||
/* GParamEnum */
|
||||
|
||||
GtkWidget * gimp_prop_paint_mode_menu_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
gboolean with_behind_mode);
|
||||
GtkWidget * gimp_prop_paint_mode_menu_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
gboolean with_behind_mode);
|
||||
|
||||
|
||||
/* GimpParamColor */
|
||||
|
||||
GtkWidget * gimp_prop_color_button_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *title,
|
||||
gint width,
|
||||
gint height,
|
||||
GimpColorAreaType type);
|
||||
GtkWidget * gimp_prop_color_button_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *title,
|
||||
gint width,
|
||||
gint height,
|
||||
GimpColorAreaType type);
|
||||
|
||||
|
||||
/* GParamObject (GimpViewable) */
|
||||
|
||||
GtkWidget * gimp_prop_preview_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
gint size);
|
||||
GtkWidget * gimp_prop_view_new (GObject *config,
|
||||
const gchar *property_name,
|
||||
gint size);
|
||||
|
||||
|
||||
#endif /* __GIMP_APP_PROP_WIDGETS_H__ */
|
||||
|
|
|
@ -59,7 +59,7 @@ static GObject * gimp_selection_editor_constructor (GType type,
|
|||
static void gimp_selection_editor_set_image (GimpImageEditor *editor,
|
||||
GimpImage *gimage);
|
||||
|
||||
static gboolean gimp_selection_preview_button_press(GtkWidget *widget,
|
||||
static gboolean gimp_selection_view_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpSelectionEditor *editor);
|
||||
static void gimp_selection_editor_drop_color (GtkWidget *widget,
|
||||
|
@ -99,23 +99,23 @@ gimp_selection_editor_init (GimpSelectionEditor *editor)
|
|||
gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
editor->preview = gimp_view_new_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_SELECTION,
|
||||
GIMP_VIEW_SIZE_HUGE,
|
||||
0, TRUE);
|
||||
gimp_view_renderer_set_background (GIMP_VIEW (editor->preview)->renderer,
|
||||
editor->view = gimp_view_new_by_types (GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_SELECTION,
|
||||
GIMP_VIEW_SIZE_HUGE,
|
||||
0, TRUE);
|
||||
gimp_view_renderer_set_background (GIMP_VIEW (editor->view)->renderer,
|
||||
GIMP_STOCK_TEXTURE);
|
||||
gtk_widget_set_size_request (editor->preview,
|
||||
gtk_widget_set_size_request (editor->view,
|
||||
GIMP_VIEW_SIZE_HUGE, GIMP_VIEW_SIZE_HUGE);
|
||||
gimp_view_set_expand (GIMP_VIEW (editor->preview), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (frame), editor->preview);
|
||||
gtk_widget_show (editor->preview);
|
||||
gimp_view_set_expand (GIMP_VIEW (editor->view), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (frame), editor->view);
|
||||
gtk_widget_show (editor->view);
|
||||
|
||||
g_signal_connect (editor->preview, "button-press-event",
|
||||
G_CALLBACK (gimp_selection_preview_button_press),
|
||||
g_signal_connect (editor->view, "button-press-event",
|
||||
G_CALLBACK (gimp_selection_view_button_press),
|
||||
editor);
|
||||
|
||||
gimp_dnd_color_dest_add (editor->preview,
|
||||
gimp_dnd_color_dest_add (editor->view,
|
||||
gimp_selection_editor_drop_color,
|
||||
editor);
|
||||
|
||||
|
@ -188,12 +188,12 @@ gimp_selection_editor_set_image (GimpImageEditor *image_editor,
|
|||
G_CALLBACK (gimp_selection_editor_mask_changed),
|
||||
editor);
|
||||
|
||||
gimp_view_set_viewable (GIMP_VIEW (editor->preview),
|
||||
gimp_view_set_viewable (GIMP_VIEW (editor->view),
|
||||
GIMP_VIEWABLE (gimp_image_get_mask (gimage)));
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_view_set_viewable (GIMP_VIEW (editor->preview), NULL);
|
||||
gimp_view_set_viewable (GIMP_VIEW (editor->view), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,9 +213,9 @@ gimp_selection_editor_new (GimpMenuFactory *menu_factory)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gimp_selection_preview_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpSelectionEditor *editor)
|
||||
gimp_selection_view_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
GimpSelectionEditor *editor)
|
||||
{
|
||||
GimpImageEditor *image_editor = GIMP_IMAGE_EDITOR (editor);
|
||||
GimpViewRenderer *renderer;
|
||||
|
@ -229,7 +229,7 @@ gimp_selection_preview_button_press (GtkWidget *widget,
|
|||
if (! image_editor->gimage)
|
||||
return TRUE;
|
||||
|
||||
renderer = GIMP_VIEW (editor->preview)->renderer;
|
||||
renderer = GIMP_VIEW (editor->view)->renderer;
|
||||
|
||||
tool_info = (GimpToolInfo *)
|
||||
gimp_container_get_child_by_name (image_editor->gimage->gimp->tool_info_list,
|
||||
|
@ -334,5 +334,5 @@ static void
|
|||
gimp_selection_editor_mask_changed (GimpImage *gimage,
|
||||
GimpSelectionEditor *editor)
|
||||
{
|
||||
gimp_view_renderer_invalidate (GIMP_VIEW (editor->preview)->renderer);
|
||||
gimp_view_renderer_invalidate (GIMP_VIEW (editor->view)->renderer);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ struct _GimpSelectionEditor
|
|||
{
|
||||
GimpImageEditor parent_instance;
|
||||
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
|
||||
GtkWidget *all_button;
|
||||
GtkWidget *none_button;
|
||||
|
|
|
@ -54,7 +54,7 @@ enum
|
|||
SESSION_INFO_DOCKABLE,
|
||||
|
||||
SESSION_INFO_DOCKABLE_TAB_STYLE,
|
||||
SESSION_INFO_DOCKABLE_PREVIEW_SIZE,
|
||||
SESSION_INFO_DOCKABLE_VIEW_SIZE,
|
||||
SESSION_INFO_DOCKABLE_AUX
|
||||
};
|
||||
|
||||
|
@ -422,8 +422,8 @@ gimp_session_info_save (GimpSessionInfo *info,
|
|||
{
|
||||
GimpContainerView *view;
|
||||
GEnumValue *enum_value;
|
||||
gchar *tab_style = "icon";
|
||||
gint preview_size = -1;
|
||||
gchar *tab_style = "icon";
|
||||
gint view_size = -1;
|
||||
GList *aux_info;
|
||||
|
||||
gimp_config_writer_open (writer, "dockable");
|
||||
|
@ -442,14 +442,13 @@ gimp_session_info_save (GimpSessionInfo *info,
|
|||
view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (view)
|
||||
preview_size = gimp_container_view_get_preview_size (view,
|
||||
NULL);
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
if (preview_size > 0 &&
|
||||
preview_size != entry->preview_size)
|
||||
if (view_size > 0 &&
|
||||
view_size != entry->view_size)
|
||||
{
|
||||
gimp_config_writer_open (writer, "preview-size");
|
||||
gimp_config_writer_printf (writer, "%d", preview_size);
|
||||
gimp_config_writer_printf (writer, "%d", view_size);
|
||||
gimp_config_writer_close (writer);
|
||||
}
|
||||
|
||||
|
@ -532,7 +531,7 @@ gimp_session_info_deserialize (GScanner *scanner,
|
|||
g_scanner_scope_add_symbol (scanner, SESSION_INFO_DOCKABLE, "tab-style",
|
||||
GINT_TO_POINTER (SESSION_INFO_DOCKABLE_TAB_STYLE));
|
||||
g_scanner_scope_add_symbol (scanner, SESSION_INFO_DOCKABLE, "preview-size",
|
||||
GINT_TO_POINTER (SESSION_INFO_DOCKABLE_PREVIEW_SIZE));
|
||||
GINT_TO_POINTER (SESSION_INFO_DOCKABLE_VIEW_SIZE));
|
||||
g_scanner_scope_add_symbol (scanner, SESSION_INFO_DOCKABLE, "aux-info",
|
||||
GINT_TO_POINTER (SESSION_INFO_DOCKABLE_AUX));
|
||||
|
||||
|
@ -729,7 +728,7 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
|||
dialog =
|
||||
gimp_dialog_factory_dialog_new (factory, screen,
|
||||
info->toplevel_entry->identifier,
|
||||
info->toplevel_entry->preview_size,
|
||||
info->toplevel_entry->view_size,
|
||||
TRUE);
|
||||
|
||||
if (dialog && info->aux_info)
|
||||
|
@ -762,9 +761,9 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
|||
GimpSessionInfoDockable *dockable_info = pages->data;
|
||||
GtkWidget *dockable;
|
||||
|
||||
if (dockable_info->preview_size < GIMP_VIEW_SIZE_TINY ||
|
||||
dockable_info->preview_size > GIMP_VIEW_SIZE_GIGANTIC)
|
||||
dockable_info->preview_size = -1;
|
||||
if (dockable_info->view_size < GIMP_VIEW_SIZE_TINY ||
|
||||
dockable_info->view_size > GIMP_VIEW_SIZE_GIGANTIC)
|
||||
dockable_info->view_size = -1;
|
||||
|
||||
/* use the new dock's dialog factory to create dockables
|
||||
* because it may be different from the dialog factory
|
||||
|
@ -774,7 +773,7 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
|||
gimp_dialog_factory_dockable_new (dock->dialog_factory,
|
||||
dock,
|
||||
dockable_info->identifier,
|
||||
dockable_info->preview_size);
|
||||
dockable_info->view_size);
|
||||
|
||||
if (! dockable)
|
||||
continue;
|
||||
|
@ -1093,9 +1092,9 @@ session_info_dockable_deserialize (GScanner *scanner,
|
|||
dockable->tab_style = enum_value->value;
|
||||
break;
|
||||
|
||||
case SESSION_INFO_DOCKABLE_PREVIEW_SIZE:
|
||||
case SESSION_INFO_DOCKABLE_VIEW_SIZE:
|
||||
token = G_TOKEN_INT;
|
||||
if (! gimp_scanner_parse_int (scanner, &dockable->preview_size))
|
||||
if (! gimp_scanner_parse_int (scanner, &dockable->view_size))
|
||||
goto error;
|
||||
break;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ struct _GimpSessionInfoDockable
|
|||
{
|
||||
gchar *identifier;
|
||||
GimpTabStyle tab_style;
|
||||
gint preview_size;
|
||||
gint view_size;
|
||||
|
||||
/* dialog specific list of GimpSessionInfoAux */
|
||||
GList *aux_info;
|
||||
|
|
|
@ -83,8 +83,8 @@ GtkWidget *
|
|||
gimp_template_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory)
|
||||
{
|
||||
GimpTemplateView *template_view;
|
||||
|
@ -95,7 +95,7 @@ gimp_template_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (template_view),
|
||||
view_type,
|
||||
container, context,
|
||||
preview_size, preview_border_width,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Templates>",
|
||||
"/templates-popup"))
|
||||
{
|
||||
|
|
|
@ -58,8 +58,8 @@ GType gimp_template_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_template_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ gimp_tool_options_editor_get_preview (GimpDocked *docked,
|
|||
|
||||
gtk_icon_size_lookup_for_settings (settings, size, &width, &height);
|
||||
|
||||
view = gimp_prop_preview_new (G_OBJECT (context), "tool", height);
|
||||
view = gimp_prop_view_new (G_OBJECT (context), "tool", height);
|
||||
GIMP_VIEW (view)->renderer->size = -1;
|
||||
gimp_view_renderer_set_size_full (GIMP_VIEW (view)->renderer,
|
||||
width, height, 0);
|
||||
|
|
|
@ -112,8 +112,8 @@ GtkWidget *
|
|||
gimp_tool_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory)
|
||||
{
|
||||
GimpToolView *tool_view;
|
||||
|
@ -124,7 +124,7 @@ gimp_tool_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (tool_view),
|
||||
view_type,
|
||||
container, context,
|
||||
preview_size, preview_border_width,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Tools>",
|
||||
"/tools-popup"))
|
||||
{
|
||||
|
@ -166,9 +166,9 @@ gimp_tool_view_new (GimpViewType view_type,
|
|||
icon_size = gimp_get_icon_size (GTK_WIDGET (tree_view),
|
||||
GIMP_STOCK_VISIBLE,
|
||||
GTK_ICON_SIZE_BUTTON,
|
||||
preview_size -
|
||||
view_size -
|
||||
2 * tree_widget->style->xthickness,
|
||||
preview_size -
|
||||
view_size -
|
||||
2 * tree_widget->style->ythickness);
|
||||
g_object_set (eye_cell, "stock-size", icon_size, NULL);
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ GType gimp_tool_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_tool_view_new (GimpViewType view_type,
|
||||
GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpMenuFactory *menu_factory);
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_PREVIEW_SIZE
|
||||
PROP_VIEW_SIZE
|
||||
};
|
||||
|
||||
|
||||
|
@ -89,9 +89,8 @@ gimp_undo_editor_class_init (GimpUndoEditorClass *klass)
|
|||
|
||||
image_editor_class->set_image = gimp_undo_editor_set_image;
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PREVIEW_SIZE,
|
||||
g_param_spec_enum ("preview-size",
|
||||
g_object_class_install_property (object_class, PROP_VIEW_SIZE,
|
||||
g_param_spec_enum ("view-size",
|
||||
NULL, NULL,
|
||||
GIMP_TYPE_VIEW_SIZE,
|
||||
GIMP_VIEW_SIZE_LARGE,
|
||||
|
@ -117,7 +116,7 @@ gimp_undo_editor_constructor (GType type,
|
|||
undo_editor = GIMP_UNDO_EDITOR (object);
|
||||
|
||||
undo_editor->view = gimp_container_tree_view_new (NULL, NULL,
|
||||
undo_editor->preview_size,
|
||||
undo_editor->view_size,
|
||||
1);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (undo_editor), undo_editor->view);
|
||||
|
@ -152,8 +151,8 @@ gimp_undo_editor_set_property (GObject *object,
|
|||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_PREVIEW_SIZE:
|
||||
undo_editor->preview_size = g_value_get_enum (value);
|
||||
case PROP_VIEW_SIZE:
|
||||
undo_editor->view_size = g_value_get_enum (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -203,7 +202,7 @@ gimp_undo_editor_new (GimpCoreConfig *config,
|
|||
"menu-factory", menu_factory,
|
||||
"menu-identifier", "<UndoEditor>",
|
||||
"ui-path", "/undo-editor-popup",
|
||||
"preview-size", config->undo_preview_size,
|
||||
"view-size", config->undo_preview_size,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ struct _GimpUndoEditor
|
|||
|
||||
GimpContainer *container;
|
||||
GtkWidget *view;
|
||||
GimpViewSize preview_size;
|
||||
GimpViewSize view_size;
|
||||
|
||||
GimpUndo *base_item;
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ gradient_box_new (GimpContainer *container,
|
|||
"gimp-gradient-list|gimp-gradient-grid",
|
||||
GIMP_STOCK_GRADIENT,
|
||||
_("Open the gradient selection dialog"));
|
||||
GIMP_VIEWABLE_BUTTON (button)->button_preview_size = GIMP_VIEW_SIZE_SMALL;
|
||||
GIMP_VIEWABLE_BUTTON (button)->button_view_size = GIMP_VIEW_SIZE_SMALL;
|
||||
|
||||
g_object_set_data (G_OBJECT (hbox), "viewable-button", button);
|
||||
|
||||
|
@ -212,7 +212,7 @@ gradient_box_new (GimpContainer *container,
|
|||
if (reverse_prop)
|
||||
{
|
||||
GtkWidget *toggle;
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
gchar *signal_name;
|
||||
|
||||
toggle = gimp_prop_check_button_new (G_OBJECT (context), reverse_prop,
|
||||
|
@ -220,17 +220,17 @@ gradient_box_new (GimpContainer *container,
|
|||
gtk_box_pack_start (GTK_BOX (hbox), toggle, TRUE, TRUE, 0);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
preview = GTK_BIN (button)->child;
|
||||
view = GTK_BIN (button)->child;
|
||||
|
||||
signal_name = g_strconcat ("notify::", reverse_prop, NULL);
|
||||
g_signal_connect_object (context, signal_name,
|
||||
G_CALLBACK (gimp_gradient_box_reverse_notify),
|
||||
G_OBJECT (preview), 0);
|
||||
G_OBJECT (view), 0);
|
||||
g_free (signal_name);
|
||||
|
||||
gimp_gradient_box_reverse_notify (G_OBJECT (context),
|
||||
NULL,
|
||||
GIMP_VIEW (preview));
|
||||
GIMP_VIEW (view));
|
||||
}
|
||||
|
||||
return hbox;
|
||||
|
@ -449,7 +449,7 @@ view_props_connect (GtkWidget *box,
|
|||
gimp_config_connect_full (G_OBJECT (context), G_OBJECT (button),
|
||||
view_type_prop, "popup-view-type");
|
||||
gimp_config_connect_full (G_OBJECT (context), G_OBJECT (button),
|
||||
view_size_prop, "popup-preview-size");
|
||||
view_size_prop, "popup-view-size");
|
||||
|
||||
return box;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ enum
|
|||
{
|
||||
PROP_0,
|
||||
PROP_POPUP_VIEW_TYPE,
|
||||
PROP_POPUP_PREVIEW_SIZE
|
||||
PROP_POPUP_VIEW_SIZE
|
||||
};
|
||||
|
||||
|
||||
|
@ -92,8 +92,8 @@ gimp_viewable_button_class_init (GimpViewableButtonClass *klass)
|
|||
GIMP_VIEW_TYPE_LIST,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_POPUP_PREVIEW_SIZE,
|
||||
g_param_spec_int ("popup-preview-size",
|
||||
g_object_class_install_property (object_class, PROP_POPUP_VIEW_SIZE,
|
||||
g_param_spec_int ("popup-view-size",
|
||||
NULL, NULL,
|
||||
GIMP_VIEW_SIZE_TINY,
|
||||
GIMP_VIEW_SIZE_GIGANTIC,
|
||||
|
@ -104,11 +104,11 @@ gimp_viewable_button_class_init (GimpViewableButtonClass *klass)
|
|||
static void
|
||||
gimp_viewable_button_init (GimpViewableButton *button)
|
||||
{
|
||||
button->popup_view_type = GIMP_VIEW_TYPE_LIST;
|
||||
button->popup_preview_size = GIMP_VIEW_SIZE_SMALL;
|
||||
button->popup_view_type = GIMP_VIEW_TYPE_LIST;
|
||||
button->popup_view_size = GIMP_VIEW_SIZE_SMALL;
|
||||
|
||||
button->button_preview_size = GIMP_VIEW_SIZE_SMALL;
|
||||
button->preview_border_width = 1;
|
||||
button->button_view_size = GIMP_VIEW_SIZE_SMALL;
|
||||
button->view_border_width = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -150,8 +150,8 @@ gimp_viewable_button_set_property (GObject *object,
|
|||
case PROP_POPUP_VIEW_TYPE:
|
||||
gimp_viewable_button_set_view_type (button, g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_POPUP_PREVIEW_SIZE:
|
||||
gimp_viewable_button_set_preview_size (button, g_value_get_int (value));
|
||||
case PROP_POPUP_VIEW_SIZE:
|
||||
gimp_viewable_button_set_view_size (button, g_value_get_int (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -172,8 +172,8 @@ gimp_viewable_button_get_property (GObject *object,
|
|||
case PROP_POPUP_VIEW_TYPE:
|
||||
g_value_set_enum (value, button->popup_view_type);
|
||||
break;
|
||||
case PROP_POPUP_PREVIEW_SIZE:
|
||||
g_value_set_int (value, button->popup_preview_size);
|
||||
case PROP_POPUP_VIEW_SIZE:
|
||||
g_value_set_int (value, button->popup_view_size);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -240,9 +240,9 @@ gimp_viewable_button_clicked (GtkButton *button)
|
|||
popup = gimp_container_popup_new (viewable_button->container,
|
||||
viewable_button->context,
|
||||
viewable_button->popup_view_type,
|
||||
viewable_button->button_preview_size,
|
||||
viewable_button->popup_preview_size,
|
||||
viewable_button->preview_border_width,
|
||||
viewable_button->button_view_size,
|
||||
viewable_button->popup_view_size,
|
||||
viewable_button->view_border_width,
|
||||
viewable_button->dialog_factory,
|
||||
viewable_button->dialog_identifier,
|
||||
viewable_button->dialog_stock_id,
|
||||
|
@ -264,8 +264,8 @@ gimp_viewable_button_popup_closed (GimpContainerPopup *popup,
|
|||
{
|
||||
gimp_viewable_button_set_view_type (button,
|
||||
gimp_container_popup_get_view_type (popup));
|
||||
gimp_viewable_button_set_preview_size (button,
|
||||
gimp_container_popup_get_preview_size (popup));
|
||||
gimp_viewable_button_set_view_size (button,
|
||||
gimp_container_popup_get_view_size (popup));
|
||||
}
|
||||
|
||||
|
||||
|
@ -275,9 +275,9 @@ GtkWidget *
|
|||
gimp_viewable_button_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
GimpViewType view_type,
|
||||
gint button_preview_size,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint button_view_size,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
|
@ -288,10 +288,10 @@ gimp_viewable_button_new (GimpContainer *container,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_BUTTON_SIZE, NULL);
|
||||
g_return_val_if_fail (preview_border_width >= 0 &&
|
||||
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_BUTTON_SIZE, NULL);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
NULL);
|
||||
g_return_val_if_fail (dialog_factory == NULL ||
|
||||
GIMP_IS_DIALOG_FACTORY (dialog_factory), NULL);
|
||||
|
@ -303,15 +303,15 @@ gimp_viewable_button_new (GimpContainer *container,
|
|||
}
|
||||
|
||||
button = g_object_new (GIMP_TYPE_VIEWABLE_BUTTON,
|
||||
"popup-view-type", view_type,
|
||||
"popup-preview-size", preview_size,
|
||||
"popup-view-type", view_type,
|
||||
"popup-view-size", view_size,
|
||||
NULL);
|
||||
|
||||
button->container = container;
|
||||
button->context = context;
|
||||
|
||||
button->button_preview_size = button_preview_size;
|
||||
button->preview_border_width = preview_border_width;
|
||||
button->button_view_size = button_view_size;
|
||||
button->view_border_width = view_border_width;
|
||||
|
||||
if (dialog_factory)
|
||||
{
|
||||
|
@ -323,10 +323,10 @@ gimp_viewable_button_new (GimpContainer *container,
|
|||
|
||||
prop_name = gimp_context_type_to_prop_name (container->children_type);
|
||||
|
||||
button->preview = gimp_prop_preview_new (G_OBJECT (context), prop_name,
|
||||
button->button_preview_size);
|
||||
gtk_container_add (GTK_CONTAINER (button), button->preview);
|
||||
gtk_widget_show (button->preview);
|
||||
button->view = gimp_prop_view_new (G_OBJECT (context), prop_name,
|
||||
button->button_view_size);
|
||||
gtk_container_add (GTK_CONTAINER (button), button->view);
|
||||
gtk_widget_show (button->view);
|
||||
|
||||
return GTK_WIDGET (button);
|
||||
}
|
||||
|
@ -354,23 +354,23 @@ gimp_viewable_button_set_view_type (GimpViewableButton *button,
|
|||
}
|
||||
|
||||
gint
|
||||
gimp_viewable_button_get_preview_size (GimpViewableButton *button)
|
||||
gimp_viewable_button_get_view_size (GimpViewableButton *button)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_VIEWABLE_BUTTON (button), GIMP_VIEW_SIZE_SMALL);
|
||||
|
||||
return button->popup_preview_size;
|
||||
return button->popup_view_size;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_viewable_button_set_preview_size (GimpViewableButton *button,
|
||||
gint preview_size)
|
||||
gimp_viewable_button_set_view_size (GimpViewableButton *button,
|
||||
gint view_size)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_VIEWABLE_BUTTON (button));
|
||||
|
||||
if (preview_size != button->popup_preview_size)
|
||||
if (view_size != button->popup_view_size)
|
||||
{
|
||||
button->popup_preview_size = preview_size;
|
||||
button->popup_view_size = view_size;
|
||||
|
||||
g_object_notify (G_OBJECT (button), "popup-preview-size");
|
||||
g_object_notify (G_OBJECT (button), "popup-view-size");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,17 +44,17 @@ struct _GimpViewableButton
|
|||
GimpContext *context;
|
||||
|
||||
GimpViewType popup_view_type;
|
||||
gint popup_preview_size;
|
||||
gint popup_view_size;
|
||||
|
||||
gint button_preview_size;
|
||||
gint preview_border_width;
|
||||
gint button_view_size;
|
||||
gint view_border_width;
|
||||
|
||||
GimpDialogFactory *dialog_factory;
|
||||
gchar *dialog_identifier;
|
||||
gchar *dialog_stock_id;
|
||||
gchar *dialog_tooltip;
|
||||
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
};
|
||||
|
||||
struct _GimpViewableButtonClass
|
||||
|
@ -68,9 +68,9 @@ GType gimp_viewable_button_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_viewable_button_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
GimpViewType view_type,
|
||||
gint button_preview_size,
|
||||
gint preview_size,
|
||||
gint preview_border_width,
|
||||
gint button_view_size,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
const gchar *dialog_identifier,
|
||||
const gchar *dialog_stock_id,
|
||||
|
@ -80,9 +80,9 @@ GimpViewType gimp_viewable_button_get_view_type (GimpViewableButton *button);
|
|||
void gimp_viewable_button_set_view_type (GimpViewableButton *button,
|
||||
GimpViewType view_type);
|
||||
|
||||
gint gimp_viewable_button_get_preview_size (GimpViewableButton *button);
|
||||
void gimp_viewable_button_set_preview_size (GimpViewableButton *button,
|
||||
gint preview_size);
|
||||
gint gimp_viewable_button_get_view_size (GimpViewableButton *button);
|
||||
void gimp_viewable_button_set_view_size (GimpViewableButton *button,
|
||||
gint view_size);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -182,7 +182,7 @@ gimp_viewable_dialog_destroy (GtkObject *object)
|
|||
{
|
||||
GimpViewableDialog *dialog = GIMP_VIEWABLE_DIALOG (object);
|
||||
|
||||
if (dialog->preview)
|
||||
if (dialog->view)
|
||||
gimp_viewable_dialog_set_viewable (dialog, NULL);
|
||||
|
||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
|
@ -234,16 +234,16 @@ gimp_viewable_dialog_set_viewable (GimpViewableDialog *dialog,
|
|||
g_return_if_fail (GIMP_IS_VIEWABLE_DIALOG (dialog));
|
||||
g_return_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable));
|
||||
|
||||
if (dialog->preview)
|
||||
if (dialog->view)
|
||||
{
|
||||
GimpViewable *old_viewable;
|
||||
|
||||
old_viewable = GIMP_VIEW (dialog->preview)->viewable;
|
||||
old_viewable = GIMP_VIEW (dialog->view)->viewable;
|
||||
|
||||
if (viewable == old_viewable)
|
||||
return;
|
||||
|
||||
gtk_widget_destroy (dialog->preview);
|
||||
gtk_widget_destroy (dialog->view);
|
||||
|
||||
if (old_viewable)
|
||||
{
|
||||
|
@ -265,13 +265,13 @@ gimp_viewable_dialog_set_viewable (GimpViewableDialog *dialog,
|
|||
dialog,
|
||||
0);
|
||||
|
||||
dialog->preview = gimp_view_new (viewable, 32, 1, TRUE);
|
||||
gtk_box_pack_end (GTK_BOX (dialog->icon->parent), dialog->preview,
|
||||
dialog->view = gimp_view_new (viewable, 32, 1, TRUE);
|
||||
gtk_box_pack_end (GTK_BOX (dialog->icon->parent), dialog->view,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_widget_show (dialog->preview);
|
||||
gtk_widget_show (dialog->view);
|
||||
|
||||
g_object_add_weak_pointer (G_OBJECT (dialog->preview),
|
||||
(gpointer *) &dialog->preview);
|
||||
g_object_add_weak_pointer (G_OBJECT (dialog->view),
|
||||
(gpointer *) &dialog->view);
|
||||
|
||||
gimp_viewable_dialog_name_changed (GIMP_OBJECT (viewable), dialog);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ struct _GimpViewableDialog
|
|||
GimpDialog parent_instance;
|
||||
|
||||
GtkWidget *icon;
|
||||
GtkWidget *preview;
|
||||
GtkWidget *view;
|
||||
GtkWidget *desc_label;
|
||||
GtkWidget *viewable_label;
|
||||
};
|
||||
|
|
|
@ -98,6 +98,7 @@ gimp_view_renderer_class_init (GimpViewRendererClass *klass)
|
|||
object_class->dispose = gimp_view_renderer_dispose;
|
||||
object_class->finalize = gimp_view_renderer_finalize;
|
||||
|
||||
klass->update = NULL;
|
||||
klass->draw = gimp_view_renderer_real_draw;
|
||||
klass->render = gimp_view_renderer_real_render;
|
||||
|
||||
|
@ -255,7 +256,7 @@ gimp_view_renderer_set_viewable (GimpViewRenderer *renderer,
|
|||
GimpViewable *viewable)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_VIEW_RENDERER (renderer));
|
||||
g_return_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable));
|
||||
g_return_if_fail (viewable == NULL || GIMP_IS_VIEWABLE (viewable));
|
||||
|
||||
if (viewable)
|
||||
g_return_if_fail (g_type_is_a (G_TYPE_FROM_INSTANCE (viewable),
|
||||
|
@ -321,31 +322,31 @@ gimp_view_renderer_set_viewable (GimpViewRenderer *renderer,
|
|||
|
||||
void
|
||||
gimp_view_renderer_set_size (GimpViewRenderer *renderer,
|
||||
gint preview_size,
|
||||
gint view_size,
|
||||
gint border_width)
|
||||
{
|
||||
gint width, height;
|
||||
|
||||
g_return_if_fail (GIMP_IS_VIEW_RENDERER (renderer));
|
||||
g_return_if_fail (preview_size > 0 &&
|
||||
preview_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
||||
g_return_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE);
|
||||
g_return_if_fail (border_width >= 0 &&
|
||||
border_width <= GIMP_VIEW_MAX_BORDER_WIDTH);
|
||||
|
||||
renderer->size = preview_size;
|
||||
renderer->size = view_size;
|
||||
|
||||
if (renderer->viewable)
|
||||
{
|
||||
gimp_viewable_get_preview_size (renderer->viewable,
|
||||
preview_size,
|
||||
view_size,
|
||||
renderer->is_popup,
|
||||
renderer->dot_for_dot,
|
||||
&width, &height);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = preview_size;
|
||||
height = preview_size;
|
||||
width = view_size;
|
||||
height = view_size;
|
||||
}
|
||||
|
||||
gimp_view_renderer_set_size_full (renderer, width, height, border_width);
|
||||
|
@ -416,18 +417,18 @@ gimp_view_renderer_set_border_type (GimpViewRenderer *renderer,
|
|||
|
||||
switch (border_type)
|
||||
{
|
||||
case GIMP_VIEW_BORDER_BLACK:
|
||||
border_color = &black_color;
|
||||
break;
|
||||
case GIMP_VIEW_BORDER_WHITE:
|
||||
border_color = &white_color;
|
||||
break;
|
||||
case GIMP_VIEW_BORDER_GREEN:
|
||||
border_color = &green_color;
|
||||
break;
|
||||
case GIMP_VIEW_BORDER_RED:
|
||||
border_color = &red_color;
|
||||
break;
|
||||
case GIMP_VIEW_BORDER_BLACK:
|
||||
border_color = &black_color;
|
||||
break;
|
||||
case GIMP_VIEW_BORDER_WHITE:
|
||||
border_color = &white_color;
|
||||
break;
|
||||
case GIMP_VIEW_BORDER_GREEN:
|
||||
border_color = &green_color;
|
||||
break;
|
||||
case GIMP_VIEW_BORDER_RED:
|
||||
border_color = &red_color;
|
||||
break;
|
||||
}
|
||||
|
||||
gimp_view_renderer_set_border_color (renderer, border_color);
|
||||
|
|
Loading…
Reference in New Issue