mirror of https://github.com/GNOME/gimp.git
app: Revert add flags for multiple selection support
Don't add additional constructor argument.
This commit is contained in:
parent
bc02c2f51e
commit
9e2723d390
|
@ -143,7 +143,7 @@ quit_close_all_dialog_new (Gimp *gimp,
|
|||
view_size = gimp->config->layer_preview_size;
|
||||
rows = CLAMP (gimp_container_get_n_children (images), 3, 6);
|
||||
|
||||
view = gimp_container_tree_view_new (images, context, view_size, 1, FALSE);
|
||||
view = gimp_container_tree_view_new (images, context, view_size, 1);
|
||||
gimp_container_box_set_size_request (GIMP_CONTAINER_BOX (view),
|
||||
-1,
|
||||
rows * (view_size + 2));
|
||||
|
|
|
@ -132,7 +132,7 @@ gimp_buffer_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (buffer_view),
|
||||
view_type,
|
||||
container, context,
|
||||
view_size, view_border_width, FALSE,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Buffers>",
|
||||
"/buffers-popup"))
|
||||
{
|
||||
|
|
|
@ -112,7 +112,6 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||
GimpContext *context,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
gboolean multiple_selection,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_identifier)
|
||||
|
@ -143,8 +142,7 @@ gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||
GIMP_CONTAINER_VIEW (gimp_container_tree_view_new (container,
|
||||
context,
|
||||
view_size,
|
||||
view_border_width,
|
||||
multiple_selection));
|
||||
view_border_width));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -63,7 +63,6 @@ gboolean gimp_container_editor_construct (GimpContainerEditor *editor,
|
|||
GimpContext *context,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
gboolean multiple_selection,
|
||||
GimpMenuFactory *menu_factory,
|
||||
const gchar *menu_identifier,
|
||||
const gchar *ui_path);
|
||||
|
|
|
@ -524,7 +524,6 @@ gimp_container_popup_create_view (GimpContainerPopup *popup)
|
|||
popup->context,
|
||||
popup->view_size,
|
||||
popup->view_border_width,
|
||||
FALSE,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
gimp_container_view_set_reorderable (GIMP_CONTAINER_VIEW (popup->editor->view),
|
||||
|
|
|
@ -190,7 +190,6 @@ gimp_container_tree_view_constructor (GType type,
|
|||
GimpContainerBox *box;
|
||||
GtkTreeStore *tree;
|
||||
GObject *object;
|
||||
gboolean multiple_selection;
|
||||
|
||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
||||
|
||||
|
@ -256,14 +255,8 @@ gimp_container_tree_view_constructor (GType type,
|
|||
|
||||
tree_view->priv->selection = gtk_tree_view_get_selection (tree_view->view);
|
||||
|
||||
g_object_get (tree_view,
|
||||
"multiple-selection", &multiple_selection,
|
||||
NULL);
|
||||
if (multiple_selection)
|
||||
{
|
||||
gtk_tree_selection_set_mode (tree_view->priv->selection,
|
||||
GTK_SELECTION_MULTIPLE);
|
||||
}
|
||||
gtk_tree_selection_set_mode (tree_view->priv->selection,
|
||||
GTK_SELECTION_MULTIPLE);
|
||||
|
||||
g_signal_connect (tree_view->priv->selection, "changed",
|
||||
G_CALLBACK (gimp_container_tree_view_selection_changed),
|
||||
|
@ -390,8 +383,7 @@ GtkWidget *
|
|||
gimp_container_tree_view_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
gboolean multiple_selection)
|
||||
gint view_border_width)
|
||||
{
|
||||
GimpContainerTreeView *tree_view;
|
||||
GimpContainerView *view;
|
||||
|
@ -405,9 +397,7 @@ gimp_container_tree_view_new (GimpContainer *container,
|
|||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
NULL);
|
||||
|
||||
tree_view = g_object_new (GIMP_TYPE_CONTAINER_TREE_VIEW,
|
||||
"multiple-selection", multiple_selection,
|
||||
NULL);
|
||||
tree_view = g_object_new (GIMP_TYPE_CONTAINER_TREE_VIEW, NULL);
|
||||
|
||||
view = GIMP_CONTAINER_VIEW (tree_view);
|
||||
|
||||
|
|
|
@ -111,8 +111,7 @@ GType gimp_container_tree_view_get_type (void) G_GNUC_CONST;
|
|||
GtkWidget * gimp_container_tree_view_new (GimpContainer *container,
|
||||
GimpContext *context,
|
||||
gint view_size,
|
||||
gint view_border_width,
|
||||
gboolean multiple_selection);
|
||||
gint view_border_width);
|
||||
|
||||
void gimp_container_tree_view_set_main_column_title
|
||||
(GimpContainerTreeView *tree_view,
|
||||
|
|
|
@ -65,7 +65,6 @@ struct _GimpContainerViewPrivate
|
|||
gint view_size;
|
||||
gint view_border_width;
|
||||
gboolean reorderable;
|
||||
gboolean multiple_selection;
|
||||
|
||||
/* initialized by subclass */
|
||||
GtkWidget *dnd_widget;
|
||||
|
@ -232,13 +231,6 @@ gimp_container_view_iface_base_init (GimpContainerViewInterface *view_iface)
|
|||
GIMP_TYPE_CONTEXT,
|
||||
GIMP_PARAM_READWRITE));
|
||||
|
||||
g_object_interface_install_property (view_iface,
|
||||
g_param_spec_boolean ("multiple-selection",
|
||||
NULL, NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
g_object_interface_install_property (view_iface,
|
||||
g_param_spec_boolean ("reorderable",
|
||||
NULL, NULL,
|
||||
|
@ -346,9 +338,6 @@ gimp_container_view_install_properties (GObjectClass *klass)
|
|||
g_object_class_override_property (klass,
|
||||
GIMP_CONTAINER_VIEW_PROP_CONTEXT,
|
||||
"context");
|
||||
g_object_class_override_property (klass,
|
||||
GIMP_CONTAINER_VIEW_PROP_MULTIPLE_SELECTION,
|
||||
"multiple-selection");
|
||||
g_object_class_override_property (klass,
|
||||
GIMP_CONTAINER_VIEW_PROP_REORDERABLE,
|
||||
"reorderable");
|
||||
|
@ -850,11 +839,6 @@ gimp_container_view_set_property (GObject *object,
|
|||
case GIMP_CONTAINER_VIEW_PROP_CONTEXT:
|
||||
gimp_container_view_set_context (view, g_value_get_object (value));
|
||||
break;
|
||||
case GIMP_CONTAINER_VIEW_PROP_MULTIPLE_SELECTION:
|
||||
{
|
||||
GimpContainerViewPrivate *private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
|
||||
private->multiple_selection = g_value_get_boolean (value);
|
||||
}
|
||||
case GIMP_CONTAINER_VIEW_PROP_REORDERABLE:
|
||||
gimp_container_view_set_reorderable (view, g_value_get_boolean (value));
|
||||
break;
|
||||
|
@ -895,11 +879,6 @@ gimp_container_view_get_property (GObject *object,
|
|||
case GIMP_CONTAINER_VIEW_PROP_CONTEXT:
|
||||
g_value_set_object (value, gimp_container_view_get_context (view));
|
||||
break;
|
||||
case GIMP_CONTAINER_VIEW_PROP_MULTIPLE_SELECTION:
|
||||
{
|
||||
GimpContainerViewPrivate *private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
|
||||
g_value_set_boolean (value, private->multiple_selection);
|
||||
}
|
||||
case GIMP_CONTAINER_VIEW_PROP_REORDERABLE:
|
||||
g_value_set_boolean (value, gimp_container_view_get_reorderable (view));
|
||||
break;
|
||||
|
|
|
@ -27,7 +27,6 @@ typedef enum
|
|||
GIMP_CONTAINER_VIEW_PROP_0,
|
||||
GIMP_CONTAINER_VIEW_PROP_CONTAINER,
|
||||
GIMP_CONTAINER_VIEW_PROP_CONTEXT,
|
||||
GIMP_CONTAINER_VIEW_PROP_MULTIPLE_SELECTION,
|
||||
GIMP_CONTAINER_VIEW_PROP_REORDERABLE,
|
||||
GIMP_CONTAINER_VIEW_PROP_VIEW_SIZE,
|
||||
GIMP_CONTAINER_VIEW_PROP_VIEW_BORDER_WIDTH,
|
||||
|
|
|
@ -268,7 +268,7 @@ gimp_controller_list_init (GimpControllerList *list)
|
|||
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (list)),
|
||||
icon_size, &icon_width, &icon_height);
|
||||
|
||||
list->dest = gimp_container_tree_view_new (NULL, NULL, icon_height, 0, FALSE);
|
||||
list->dest = gimp_container_tree_view_new (NULL, NULL, icon_height, 0);
|
||||
gimp_container_tree_view_set_main_column_title (GIMP_CONTAINER_TREE_VIEW (list->dest),
|
||||
_("Active Controllers"));
|
||||
gtk_tree_view_set_headers_visible (GIMP_CONTAINER_TREE_VIEW (list->dest)->view,
|
||||
|
|
|
@ -230,7 +230,7 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (factory_view),
|
||||
view_type,
|
||||
factory_view->priv->tag_filtered_container, context,
|
||||
view_size, view_border_width, TRUE,
|
||||
view_size, view_border_width,
|
||||
menu_factory, menu_identifier,
|
||||
ui_identifier))
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ gimp_device_editor_init (GimpDeviceEditor *editor)
|
|||
GTK_ICON_SIZE_BUTTON,
|
||||
&icon_width, &icon_height);
|
||||
|
||||
private->treeview = gimp_container_tree_view_new (NULL, NULL, icon_height, 0, FALSE);
|
||||
private->treeview = gimp_container_tree_view_new (NULL, NULL, icon_height, 0);
|
||||
gtk_widget_set_size_request (private->treeview, 200, -1);
|
||||
gtk_box_pack_start (GTK_BOX (editor), private->treeview, FALSE, FALSE, 0);
|
||||
gtk_widget_show (private->treeview);
|
||||
|
|
|
@ -85,7 +85,7 @@ gimp_document_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (document_view),
|
||||
view_type,
|
||||
container, context,
|
||||
view_size, view_border_width, FALSE,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Documents>",
|
||||
"/documents-popup"))
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ gimp_font_view_new (GimpViewType view_type,
|
|||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (font_view),
|
||||
view_type,
|
||||
container,context,
|
||||
view_size, view_border_width, FALSE,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Fonts>",
|
||||
"/fonts-popup"))
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
view_size, view_border_width, FALSE,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Images>",
|
||||
"/images-popup"))
|
||||
{
|
||||
|
|
|
@ -148,7 +148,7 @@ gimp_settings_editor_constructor (GType type,
|
|||
|
||||
editor->view = gimp_container_tree_view_new (editor->container,
|
||||
gimp_get_user_context (editor->gimp),
|
||||
16, 0, FALSE);
|
||||
16, 0);
|
||||
gtk_widget_set_size_request (editor->view, 200, 200);
|
||||
gtk_container_add (GTK_CONTAINER (editor), editor->view);
|
||||
gtk_widget_show (editor->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,
|
||||
view_size, view_border_width, FALSE,
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Templates>",
|
||||
"/templates-popup"))
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ gimp_undo_editor_constructor (GType type,
|
|||
|
||||
undo_editor->view = gimp_container_tree_view_new (NULL, NULL,
|
||||
undo_editor->view_size,
|
||||
1, FALSE);
|
||||
1);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (undo_editor), undo_editor->view);
|
||||
gtk_widget_show (undo_editor->view);
|
||||
|
|
Loading…
Reference in New Issue