summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Schwinn <alexxcons@xfce.org>2020-05-16 22:03:38 +0200
committerAlexander Schwinn <alexxcons@xfce.org>2020-05-17 11:51:40 +0200
commit98a3c411e0d03d61c91490bea99ed0a0314f9073 (patch)
tree261e62a0c2a3c0f5263aeb936621c23eb0488e46
parentcfe960fe1a1b0668da58bc6f5e1aa54d0d4f8e0c (diff)
downloadthunar-98a3c411e0d03d61c91490bea99ed0a0314f9073.tar.gz
Remove unused deprecated GtkUiManager (Bug #16654)
-rw-r--r--thunar/thunar-abstract-icon-view.c40
-rw-r--r--thunar/thunar-component.c65
-rw-r--r--thunar/thunar-component.h8
-rw-r--r--thunar/thunar-details-view.c39
-rw-r--r--thunar/thunar-launcher.c58
-rw-r--r--thunar/thunar-renamer-dialog.c5
-rw-r--r--thunar/thunar-shortcuts-pane.c55
-rw-r--r--thunar/thunar-standard-view.c78
-rw-r--r--thunar/thunar-standard-view.h10
-rw-r--r--thunar/thunar-tree-pane.c13
-rw-r--r--thunar/thunar-window.c39
11 files changed, 1 insertions, 409 deletions
diff --git a/thunar/thunar-abstract-icon-view.c b/thunar/thunar-abstract-icon-view.c
index 46be6e52..4ed1c939 100644
--- a/thunar/thunar-abstract-icon-view.c
+++ b/thunar/thunar-abstract-icon-view.c
@@ -36,10 +36,6 @@
static void thunar_abstract_icon_view_style_set (GtkWidget *widget,
GtkStyle *previous_style);
-static void thunar_abstract_icon_view_connect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager);
-static void thunar_abstract_icon_view_disconnect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager);
static GList *thunar_abstract_icon_view_get_selected_items (ThunarStandardView *standard_view);
static void thunar_abstract_icon_view_select_all (ThunarStandardView *standard_view);
static void thunar_abstract_icon_view_unselect_all (ThunarStandardView *standard_view);
@@ -102,9 +98,6 @@ static void thunar_abstract_icon_view_action_sort_descending(ThunarStand
struct _ThunarAbstractIconViewPrivate
{
- /* the UI manager merge id for the abstract icon view */
- gint ui_merge_id;
-
GtkSortType sort_order;
gint sort_column;
@@ -150,8 +143,6 @@ thunar_abstract_icon_view_class_init (ThunarAbstractIconViewClass *klass)
gtkwidget_class->style_set = thunar_abstract_icon_view_style_set;
thunarstandard_view_class = THUNAR_STANDARD_VIEW_CLASS (klass);
- thunarstandard_view_class->connect_ui_manager = thunar_abstract_icon_view_connect_ui_manager;
- thunarstandard_view_class->disconnect_ui_manager = thunar_abstract_icon_view_disconnect_ui_manager;
thunarstandard_view_class->get_selected_items = thunar_abstract_icon_view_get_selected_items;
thunarstandard_view_class->select_all = thunar_abstract_icon_view_select_all;
thunarstandard_view_class->unselect_all = thunar_abstract_icon_view_unselect_all;
@@ -269,37 +260,6 @@ thunar_abstract_icon_view_style_set (GtkWidget *widget,
-static void
-thunar_abstract_icon_view_connect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager)
-{
- ThunarAbstractIconView *abstract_icon_view = THUNAR_ABSTRACT_ICON_VIEW (standard_view);
- GError *error = NULL;
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- abstract_icon_view->priv->ui_merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, thunar_abstract_icon_view_ui,
- thunar_abstract_icon_view_ui_length, &error);
-G_GNUC_END_IGNORE_DEPRECATIONS
- if (G_UNLIKELY (abstract_icon_view->priv->ui_merge_id == 0))
- {
- g_error ("Failed to merge ThunarAbstractIconView menus: %s", error->message);
- g_error_free (error);
- }
-}
-
-
-
-static void
-thunar_abstract_icon_view_disconnect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager)
-{
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- gtk_ui_manager_remove_ui (ui_manager, THUNAR_ABSTRACT_ICON_VIEW (standard_view)->priv->ui_merge_id);
-G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
-
-
static GList*
thunar_abstract_icon_view_get_selected_items (ThunarStandardView *standard_view)
{
diff --git a/thunar/thunar-component.c b/thunar/thunar-component.c
index 29cd6849..126cbecf 100644
--- a/thunar/thunar-component.c
+++ b/thunar/thunar-component.c
@@ -85,22 +85,6 @@ thunar_component_class_init (gpointer klass)
"selected-files",
THUNARX_TYPE_FILE_INFO_LIST,
EXO_PARAM_READWRITE));
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /**
- * ThunarComponent:ui-manager:
- *
- * The UI manager used by the surrounding #ThunarWindow. The
- * #ThunarComponent implementations may connect additional actions
- * to the UI manager.
- **/
- g_object_interface_install_property (klass,
- g_param_spec_object ("ui-manager",
- "ui-manager",
- "ui-manager",
- GTK_TYPE_UI_MANAGER,
- EXO_PARAM_READWRITE));
-G_GNUC_END_IGNORE_DEPRECATIONS
}
@@ -160,52 +144,3 @@ thunar_component_restore_selection (ThunarComponent *component)
thunar_component_set_selected_files (component, selected_files);
thunar_g_file_list_free (selected_files);
}
-
-
-
-/**
- * thunar_component_get_ui_manager:
- * @component : a #ThunarComponent instance.
- *
- * Returns the #GtkUIManager associated with @component or
- * %NULL if @component has no #GtkUIManager associated with
- * it.
- *
- * Return value: the #GtkUIManager associated with @component
- * or %NULL.
- **/
-GtkUIManager*
-thunar_component_get_ui_manager (ThunarComponent *component)
-{
- _thunar_return_val_if_fail (THUNAR_IS_COMPONENT (component), NULL);
- return (*THUNAR_COMPONENT_GET_IFACE (component)->get_ui_manager) (component);
-}
-
-
-
-/**
- * thunar_component_set_ui_manager:
- * @component : a #ThunarComponent instance.
- * @ui_manager : a #GtkUIManager or %NULL.
- *
- * Installs a new #GtkUIManager for @component or resets the ::ui-manager
- * property.
- *
- * Implementations of the #ThunarComponent interface must first disconnect
- * from any previously set #GtkUIManager and then connect to the
- * @ui_manager if not %NULL.
- **/
-void
-thunar_component_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager)
-{
- _thunar_return_if_fail (THUNAR_IS_COMPONENT (component));
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- _thunar_return_if_fail (ui_manager == NULL || GTK_IS_UI_MANAGER (ui_manager));
-G_GNUC_END_IGNORE_DEPRECATIONS
- (*THUNAR_COMPONENT_GET_IFACE (component)->set_ui_manager) (component, ui_manager);
-}
-
-
-
-
diff --git a/thunar/thunar-component.h b/thunar/thunar-component.h
index 17fe7056..abbb342d 100644
--- a/thunar/thunar-component.h
+++ b/thunar/thunar-component.h
@@ -40,10 +40,6 @@ struct _ThunarComponentIface
GList *(*get_selected_files) (ThunarComponent *component);
void (*set_selected_files) (ThunarComponent *component,
GList *selected_files);
-
- GtkUIManager *(*get_ui_manager) (ThunarComponent *component);
- void (*set_ui_manager) (ThunarComponent *component,
- GtkUIManager *ui_manager);
};
GType thunar_component_get_type (void) G_GNUC_CONST;
@@ -54,10 +50,6 @@ void thunar_component_set_selected_files (ThunarComponent *component,
void thunar_component_restore_selection (ThunarComponent *component);
-GtkUIManager *thunar_component_get_ui_manager (ThunarComponent *component);
-void thunar_component_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager);
-
G_END_DECLS;
#endif /* !__THUNAR_COMPONENT_H__ */
diff --git a/thunar/thunar-details-view.c b/thunar/thunar-details-view.c
index 331e1f2d..a3528a85 100644
--- a/thunar/thunar-details-view.c
+++ b/thunar/thunar-details-view.c
@@ -53,10 +53,6 @@ static void thunar_details_view_set_property (GObject
const GValue *value,
GParamSpec *pspec);
static AtkObject *thunar_details_view_get_accessible (GtkWidget *widget);
-static void thunar_details_view_connect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager);
-static void thunar_details_view_disconnect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager);
static GList *thunar_details_view_get_selected_items (ThunarStandardView *standard_view);
static void thunar_details_view_select_all (ThunarStandardView *standard_view);
static void thunar_details_view_unselect_all (ThunarStandardView *standard_view);
@@ -136,9 +132,6 @@ struct _ThunarDetailsView
/* whether to use fixed column widths */
gboolean fixed_columns;
- /* the UI manager merge id for the details view */
- guint ui_merge_id;
-
/* whether the most recent item activation used a mouse button press */
gboolean button_pressed;
};
@@ -174,8 +167,6 @@ thunar_details_view_class_init (ThunarDetailsViewClass *klass)
gtkwidget_class->get_accessible = thunar_details_view_get_accessible;
thunarstandard_view_class = THUNAR_STANDARD_VIEW_CLASS (klass);
- thunarstandard_view_class->connect_ui_manager = thunar_details_view_connect_ui_manager;
- thunarstandard_view_class->disconnect_ui_manager = thunar_details_view_disconnect_ui_manager;
thunarstandard_view_class->get_selected_items = thunar_details_view_get_selected_items;
thunarstandard_view_class->select_all = thunar_details_view_select_all;
thunarstandard_view_class->unselect_all = thunar_details_view_unselect_all;
@@ -421,36 +412,6 @@ thunar_details_view_get_accessible (GtkWidget *widget)
}
-static void
-thunar_details_view_connect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager)
-{
- ThunarDetailsView *details_view = THUNAR_DETAILS_VIEW (standard_view);
- GError *error = NULL;
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- details_view->ui_merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, thunar_details_view_ui,
- thunar_details_view_ui_length, &error);
-G_GNUC_END_IGNORE_DEPRECATIONS
- if (G_UNLIKELY (details_view->ui_merge_id == 0))
- {
- g_error ("Failed to merge ThunarDetailsView menus: %s", error->message);
- g_error_free (error);
- }
-}
-
-
-
-static void
-thunar_details_view_disconnect_ui_manager (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager)
-{
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- gtk_ui_manager_remove_ui (ui_manager, THUNAR_DETAILS_VIEW (standard_view)->ui_merge_id);
-G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
-
static GList*
thunar_details_view_get_selected_items (ThunarStandardView *standard_view)
diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c
index 517e0d79..f9cb9183 100644
--- a/thunar/thunar-launcher.c
+++ b/thunar/thunar-launcher.c
@@ -69,7 +69,6 @@ enum
PROP_0,
PROP_CURRENT_DIRECTORY,
PROP_SELECTED_FILES,
- PROP_UI_MANAGER,
PROP_WIDGET,
PROP_SELECT_FILES_CLOSURE,
N_PROPERTIES
@@ -95,9 +94,6 @@ static void thunar_launcher_set_current_directory (Thuna
static GList *thunar_launcher_get_selected_files (ThunarComponent *component);
static void thunar_launcher_set_selected_files (ThunarComponent *component,
GList *selected_files);
-static GtkUIManager *thunar_launcher_get_ui_manager (ThunarComponent *component);
-static void thunar_launcher_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager);
static void thunar_launcher_execute_files (ThunarLauncher *launcher,
GList *files);
static void thunar_launcher_open_file (ThunarLauncher *launcher,
@@ -173,8 +169,6 @@ struct _ThunarLauncher
ThunarFile *current_directory;
GList *selected_files;
- GtkUIManager *ui_manager;
-
gint n_selected_files;
gint n_selected_directories;
gint n_selected_executables;
@@ -307,10 +301,6 @@ thunar_launcher_class_init (ThunarLauncherClass *klass)
g_param_spec_override ("selected-files",
g_object_interface_find_property (g_iface, "selected-files"));
- launcher_props[PROP_UI_MANAGER] =
- g_param_spec_override ("ui-manager",
- g_object_interface_find_property (g_iface, "ui-manager"));
-
/* install properties */
g_object_class_install_properties (gobject_class, N_PROPERTIES, launcher_props);
}
@@ -322,8 +312,6 @@ thunar_launcher_component_init (ThunarComponentIface *iface)
{
iface->get_selected_files = thunar_launcher_get_selected_files;
iface->set_selected_files = thunar_launcher_set_selected_files;
- iface->get_ui_manager = thunar_launcher_get_ui_manager;
- iface->set_ui_manager = thunar_launcher_set_ui_manager;
}
@@ -356,7 +344,6 @@ thunar_launcher_dispose (GObject *object)
/* reset our properties */
thunar_navigator_set_current_directory (THUNAR_NAVIGATOR (launcher), NULL);
- thunar_component_set_ui_manager (THUNAR_COMPONENT (launcher), NULL);
thunar_launcher_set_widget (THUNAR_LAUNCHER (launcher), NULL);
/* disconnect from the currently selected files */
@@ -401,10 +388,6 @@ thunar_launcher_get_property (GObject *object,
g_value_set_boxed (value, thunar_component_get_selected_files (THUNAR_COMPONENT (object)));
break;
- case PROP_UI_MANAGER:
- g_value_set_object (value, thunar_component_get_ui_manager (THUNAR_COMPONENT (object)));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -431,10 +414,6 @@ thunar_launcher_set_property (GObject *object,
thunar_component_set_selected_files (THUNAR_COMPONENT (object), g_value_get_boxed (value));
break;
- case PROP_UI_MANAGER:
- thunar_component_set_ui_manager (THUNAR_COMPONENT (object), g_value_get_object (value));
- break;
-
case PROP_WIDGET:
thunar_launcher_set_widget (launcher, g_value_get_object (value));
break;
@@ -591,43 +570,6 @@ thunar_launcher_set_selected_files (ThunarComponent *component,
-static GtkUIManager*
-thunar_launcher_get_ui_manager (ThunarComponent *component)
-{
- return THUNAR_LAUNCHER (component)->ui_manager;
-}
-
-
-
-static void
-thunar_launcher_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager)
-{
- ThunarLauncher *launcher = THUNAR_LAUNCHER (component);
-
- /* disconnect from the previous UI manager */
- if (G_UNLIKELY (launcher->ui_manager != NULL))
- {
- /* drop the reference on the previous UI manager */
- g_object_unref (G_OBJECT (launcher->ui_manager));
- }
-
- /* activate the new UI manager */
- launcher->ui_manager = ui_manager;
-
- /* connect to the new UI manager */
- if (G_LIKELY (ui_manager != NULL))
- {
- /* we keep a reference on the new manager */
- g_object_ref (G_OBJECT (ui_manager));
- }
-
- /* notify listeners */
- g_object_notify_by_pspec (G_OBJECT (launcher), launcher_props[PROP_UI_MANAGER]);
-}
-
-
-
/**
* thunar_launcher_set_widget:
* @launcher : a #ThunarLauncher.
diff --git a/thunar/thunar-renamer-dialog.c b/thunar/thunar-renamer-dialog.c
index f76e77e8..0e4fb86c 100644
--- a/thunar/thunar-renamer-dialog.c
+++ b/thunar/thunar-renamer-dialog.c
@@ -164,8 +164,6 @@ struct _ThunarRenamerDialog
ThunarLauncher *launcher;
- GtkUIManager *ui_manager;
-
GtkWidget *cancel_button;
GtkWidget *close_button;
@@ -368,7 +366,6 @@ thunar_renamer_dialog_init (ThunarRenamerDialog *renamer_dialog)
/* setup the launcher support for this dialog */
renamer_dialog->launcher = g_object_new (THUNAR_TYPE_LAUNCHER, "widget", GTK_WIDGET (renamer_dialog), NULL);
- thunar_component_set_ui_manager (THUNAR_COMPONENT (renamer_dialog->launcher), renamer_dialog->ui_manager);
exo_binding_new (G_OBJECT (renamer_dialog), "selected-files", G_OBJECT (renamer_dialog->launcher), "selected-files");
/* add the toolbar to the dialog */
@@ -643,8 +640,6 @@ thunar_renamer_dialog_finalize (GObject *object)
/* release the launcher support */
g_object_unref (G_OBJECT (renamer_dialog->launcher));
- g_object_unref (G_OBJECT (renamer_dialog->ui_manager));
-
/* release our bulk rename model */
g_object_unref (G_OBJECT (renamer_dialog->model));
diff --git a/thunar/thunar-shortcuts-pane.c b/thunar/thunar-shortcuts-pane.c
index 11ac543b..af22391d 100644
--- a/thunar/thunar-shortcuts-pane.c
+++ b/thunar/thunar-shortcuts-pane.c
@@ -37,7 +37,6 @@ enum
PROP_CURRENT_DIRECTORY,
PROP_SELECTED_FILES,
PROP_SHOW_HIDDEN,
- PROP_UI_MANAGER,
};
@@ -61,9 +60,6 @@ static void thunar_shortcuts_pane_set_current_directory (ThunarNavigato
static GList *thunar_shortcuts_pane_get_selected_files (ThunarComponent *component);
static void thunar_shortcuts_pane_set_selected_files (ThunarComponent *component,
GList *selected_files);
-static GtkUIManager *thunar_shortcuts_pane_get_ui_manager (ThunarComponent *component);
-static void thunar_shortcuts_pane_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager);
static void thunar_shortcuts_pane_show_shortcuts_view_padding (GtkWidget *widget);
static void thunar_shortcuts_pane_hide_shortcuts_view_padding (GtkWidget *widget);
@@ -81,8 +77,6 @@ struct _ThunarShortcutsPane
ThunarFile *current_directory;
GList *selected_files;
- GtkUIManager *ui_manager;
-
GtkWidget *view;
guint idle_select_directory;
@@ -113,7 +107,6 @@ thunar_shortcuts_pane_class_init (ThunarShortcutsPaneClass *klass)
/* override ThunarComponent's properties */
g_object_class_override_property (gobject_class, PROP_SELECTED_FILES, "selected-files");
- g_object_class_override_property (gobject_class, PROP_UI_MANAGER, "ui-manager");
/* override ThunarSidePane's properties */
g_object_class_override_property (gobject_class, PROP_SHOW_HIDDEN, "show-hidden");
@@ -126,8 +119,6 @@ thunar_shortcuts_pane_component_init (ThunarComponentIface *iface)
{
iface->get_selected_files = thunar_shortcuts_pane_get_selected_files;
iface->set_selected_files = thunar_shortcuts_pane_set_selected_files;
- iface->get_ui_manager = thunar_shortcuts_pane_get_ui_manager;
- iface->set_ui_manager = thunar_shortcuts_pane_set_ui_manager;
}
@@ -191,7 +182,6 @@ thunar_shortcuts_pane_dispose (GObject *object)
thunar_navigator_set_current_directory (THUNAR_NAVIGATOR (shortcuts_pane), NULL);
thunar_component_set_selected_files (THUNAR_COMPONENT (shortcuts_pane), NULL);
- thunar_component_set_ui_manager (THUNAR_COMPONENT (shortcuts_pane), NULL);
(*G_OBJECT_CLASS (thunar_shortcuts_pane_parent_class)->dispose) (object);
}
@@ -226,10 +216,6 @@ thunar_shortcuts_pane_get_property (GObject *object,
g_value_set_boolean (value, thunar_side_pane_get_show_hidden (THUNAR_SIDE_PANE (object)));
break;
- case PROP_UI_MANAGER:
- g_value_set_object (value, thunar_component_get_ui_manager (THUNAR_COMPONENT (object)));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -258,10 +244,6 @@ thunar_shortcuts_pane_set_property (GObject *object,
thunar_side_pane_set_show_hidden (THUNAR_SIDE_PANE (object), g_value_get_boolean (value));
break;
- case PROP_UI_MANAGER:
- thunar_component_set_ui_manager (THUNAR_COMPONENT (object), g_value_get_object (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -362,43 +344,6 @@ thunar_shortcuts_pane_set_selected_files (ThunarComponent *component,
-static GtkUIManager*
-thunar_shortcuts_pane_get_ui_manager (ThunarComponent *component)
-{
- return THUNAR_SHORTCUTS_PANE (component)->ui_manager;
-}
-
-
-
-static void
-thunar_shortcuts_pane_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager)
-{
- ThunarShortcutsPane *shortcuts_pane = THUNAR_SHORTCUTS_PANE (component);
-
- /* disconnect from the previous UI manager */
- if (G_UNLIKELY (shortcuts_pane->ui_manager != NULL))
- {
- /* drop our reference on the previous UI manager */
- g_object_unref (G_OBJECT (shortcuts_pane->ui_manager));
- }
-
- /* activate the new UI manager */
- shortcuts_pane->ui_manager = ui_manager;
-
- /* connect to the new UI manager */
- if (G_LIKELY (ui_manager != NULL))
- {
- /* we keep a reference on the new manager */
- g_object_ref (G_OBJECT (ui_manager));
- }
-
- /* notify listeners */
- g_object_notify (G_OBJECT (shortcuts_pane), "ui-manager");
-}
-
-
-
/**
* thunar_shortcuts_pane_add_shortcut:
* @shortcuts_pane : Instance of a #ThunarShortcutsPane
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index d964efe5..cf94c984 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -71,7 +71,6 @@ enum
PROP_SELECTED_FILES,
PROP_SHOW_HIDDEN,
PROP_STATUSBAR_TEXT,
- PROP_UI_MANAGER,
PROP_ZOOM_LEVEL,
PROP_THUMBNAIL_DRAW_FRAMES,
PROP_ACCEL_GROUP,
@@ -119,9 +118,6 @@ static gboolean thunar_standard_view_draw (Gtk
static GList *thunar_standard_view_get_selected_files_component (ThunarComponent *component);
static void thunar_standard_view_set_selected_files_component (ThunarComponent *component,
GList *selected_files);
-static GtkUIManager *thunar_standard_view_get_ui_manager (ThunarComponent *component);
-static void thunar_standard_view_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager);
static ThunarFile *thunar_standard_view_get_current_directory (ThunarNavigator *navigator);
static void thunar_standard_view_set_current_directory (ThunarNavigator *navigator,
ThunarFile *current_directory);
@@ -398,8 +394,6 @@ thunar_standard_view_class_init (ThunarStandardViewClass *klass)
gtkwidget_class->draw = thunar_standard_view_draw;
xfce_gtk_translate_action_entries (thunar_standard_view_action_entries, G_N_ELEMENTS (thunar_standard_view_action_entries));
- klass->connect_ui_manager = (gpointer) exo_noop;
- klass->disconnect_ui_manager = (gpointer) exo_noop;
/**
* ThunarStandardView:loading:
@@ -462,10 +456,6 @@ thunar_standard_view_class_init (ThunarStandardViewClass *klass)
g_param_spec_override ("selected-files",
g_object_interface_find_property (g_iface, "selected-files"));
- standard_view_props[PROP_UI_MANAGER] =
- g_param_spec_override ("ui-manager",
- g_object_interface_find_property (g_iface, "ui-manager"));
-
/* override ThunarNavigator's properties */
g_iface = g_type_default_interface_peek (THUNAR_TYPE_NAVIGATOR);
standard_view_props[PROP_CURRENT_DIRECTORY] =
@@ -525,8 +515,6 @@ thunar_standard_view_component_init (ThunarComponentIface *iface)
{
iface->get_selected_files = thunar_standard_view_get_selected_files_component;
iface->set_selected_files = thunar_standard_view_set_selected_files_component;
- iface->get_ui_manager = thunar_standard_view_get_ui_manager;
- iface->set_ui_manager = thunar_standard_view_set_ui_manager;
}
@@ -748,9 +736,6 @@ thunar_standard_view_dispose (GObject *object)
standard_view->priv->drag_timer_event = NULL;
}
- /* reset the UI manager property */
- thunar_component_set_ui_manager (THUNAR_COMPONENT (standard_view), NULL);
-
/* disconnect from file */
if (standard_view->priv->current_directory != NULL)
{
@@ -886,10 +871,6 @@ thunar_standard_view_get_property (GObject *object,
g_value_set_static_string (value, thunar_view_get_statusbar_text (THUNAR_VIEW (object)));
break;
- case PROP_UI_MANAGER:
- g_value_set_object (value, thunar_component_get_ui_manager (THUNAR_COMPONENT (object)));
- break;
-
case PROP_ZOOM_LEVEL:
g_value_set_enum (value, thunar_view_get_zoom_level (THUNAR_VIEW (object)));
break;
@@ -933,10 +914,6 @@ thunar_standard_view_set_property (GObject *object,
thunar_view_set_show_hidden (THUNAR_VIEW (object), g_value_get_boolean (value));
break;
- case PROP_UI_MANAGER:
- thunar_component_set_ui_manager (THUNAR_COMPONENT (object), g_value_get_object (value));
- break;
-
case PROP_ZOOM_LEVEL:
thunar_view_set_zoom_level (THUNAR_VIEW (object), g_value_get_enum (value));
break;
@@ -1123,61 +1100,6 @@ thunar_standard_view_set_selected_files_component (ThunarComponent *component,
-static GtkUIManager*
-thunar_standard_view_get_ui_manager (ThunarComponent *component)
-{
- return THUNAR_STANDARD_VIEW (component)->ui_manager;
-}
-
-
-
-static void
-thunar_standard_view_set_ui_manager (ThunarComponent *component,
- GtkUIManager *ui_manager)
-{
- ThunarStandardView *standard_view = THUNAR_STANDARD_VIEW (component);
-
- /* leave if nothing changed */
- if (standard_view->ui_manager == ui_manager)
- return;
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* disconnect from the previous UI manager */
- if (G_LIKELY (standard_view->ui_manager != NULL))
- {
- /* unmerge the ui controls from derived classes */
- (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->disconnect_ui_manager) (standard_view, standard_view->ui_manager);
-
- /* force update to remove all actions and proxies */
- gtk_ui_manager_ensure_update (standard_view->ui_manager);
-
- /* drop the reference on the previous UI manager */
- g_object_unref (G_OBJECT (standard_view->ui_manager));
- }
-
- /* apply the new setting */
- standard_view->ui_manager = ui_manager;
-
- /* connect to the new manager (if any) */
- if (G_LIKELY (ui_manager != NULL))
- {
- /* we keep a reference on the new manager */
- g_object_ref (G_OBJECT (ui_manager));
-
- /* merge the ui controls from derived classes */
- (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->connect_ui_manager) (standard_view, ui_manager);
-
- /* force update to avoid flickering */
- gtk_ui_manager_ensure_update (standard_view->ui_manager);
- }
-
-G_GNUC_END_IGNORE_DEPRECATIONS
- /* let others know that we have a new manager */
- g_object_notify_by_pspec (G_OBJECT (standard_view), standard_view_props[PROP_UI_MANAGER]);
-}
-
-
-
static void
thunar_standard_view_set_selected_files_view (ThunarView *view,
GList *selected_files)
diff --git a/thunar/thunar-standard-view.h b/thunar/thunar-standard-view.h
index ebad3185..31cb4450 100644
--- a/thunar/thunar-standard-view.h
+++ b/thunar/thunar-standard-view.h
@@ -53,14 +53,6 @@ struct _ThunarStandardViewClass
{
GtkScrolledWindowClass __parent__;
- /* Called by the ThunarStandardView class to let derived classes
- * connect to and disconnect from the UI manager.
- */
- void (*connect_ui_manager) (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager);
- void (*disconnect_ui_manager) (ThunarStandardView *standard_view,
- GtkUIManager *ui_manager);
-
/* Returns the list of currently selected GtkTreePath's, where
* both the list and the items are owned by the caller. */
GList *(*get_selected_items) (ThunarStandardView *standard_view);
@@ -145,8 +137,6 @@ struct _ThunarStandardView
ThunarListModel *model;
- GtkUIManager *ui_manager;
-
ThunarIconFactory *icon_factory;
GtkCellRenderer *icon_renderer;
GtkCellRenderer *name_renderer;
diff --git a/thunar/thunar-tree-pane.c b/thunar/thunar-tree-pane.c
index c1a9086b..109336b6 100644
--- a/thunar/thunar-tree-pane.c
+++ b/thunar/thunar-tree-pane.c
@@ -33,7 +33,6 @@ enum
PROP_CURRENT_DIRECTORY,
PROP_SELECTED_FILES,
PROP_SHOW_HIDDEN,
- PROP_UI_MANAGER,
};
@@ -97,7 +96,6 @@ thunar_tree_pane_class_init (ThunarTreePaneClass *klass)
/* override ThunarComponent's properties */
g_object_class_override_property (gobject_class, PROP_SELECTED_FILES, "selected-files");
- g_object_class_override_property (gobject_class, PROP_UI_MANAGER, "ui-manager");
/* override ThunarSidePane's properties */
g_object_class_override_property (gobject_class, PROP_SHOW_HIDDEN, "show-hidden");
@@ -110,8 +108,6 @@ thunar_tree_pane_component_init (ThunarComponentIface *iface)
{
iface->get_selected_files = (gpointer) exo_noop_null;
iface->set_selected_files = (gpointer) exo_noop;
- iface->get_ui_manager = (gpointer) exo_noop_null;
- iface->set_ui_manager = (gpointer) exo_noop;
}
@@ -162,7 +158,6 @@ thunar_tree_pane_dispose (GObject *object)
thunar_navigator_set_current_directory (THUNAR_NAVIGATOR (tree_pane), NULL);
thunar_component_set_selected_files (THUNAR_COMPONENT (tree_pane), NULL);
- thunar_component_set_ui_manager (THUNAR_COMPONENT (tree_pane), NULL);
(*G_OBJECT_CLASS (thunar_tree_pane_parent_class)->dispose) (object);
}
@@ -189,10 +184,6 @@ thunar_tree_pane_get_property (GObject *object,
g_value_set_boolean (value, thunar_side_pane_get_show_hidden (THUNAR_SIDE_PANE (object)));
break;
- case PROP_UI_MANAGER:
- g_value_set_object (value, thunar_component_get_ui_manager (THUNAR_COMPONENT (object)));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -221,10 +212,6 @@ thunar_tree_pane_set_property (GObject *object,
thunar_side_pane_set_show_hidden (THUNAR_SIDE_PANE (object), g_value_get_boolean (value));
break;
- case PROP_UI_MANAGER:
- thunar_component_set_ui_manager (THUNAR_COMPONENT (object), g_value_get_object (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index f2b849e3..b06a9715 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -69,7 +69,6 @@ enum
{
PROP_0,
PROP_CURRENT_DIRECTORY,
- PROP_UI_MANAGER,
PROP_ZOOM_LEVEL,
};
@@ -290,8 +289,6 @@ struct _ThunarWindow
ThunarIconFactory *icon_factory;
- GtkUIManager *ui_manager;
-
/* to be able to change folder on "device-pre-unmount" if required */
ThunarDeviceMonitor *device_monitor;
@@ -454,23 +451,6 @@ thunar_window_class_init (ThunarWindowClass *klass)
THUNAR_TYPE_FILE,
EXO_PARAM_READWRITE));
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /**
- * ThunarWindow:ui-manager:
- *
- * The #GtkUIManager used for this #ThunarWindow. This property
- * can only be read and is garantied to always contain a valid
- * #GtkUIManager instance (thus it's never %NULL).
- **/
- g_object_class_install_property (gobject_class,
- PROP_UI_MANAGER,
- g_param_spec_object ("ui-manager",
- "ui-manager",
- "ui-manager",
- GTK_TYPE_UI_MANAGER,
- EXO_PARAM_READABLE));
-G_GNUC_END_IGNORE_DEPRECATIONS
-
/**
* ThunarWindow:zoom-level:
*
@@ -728,9 +708,6 @@ thunar_window_init (ThunarWindow *window)
window->launcher = g_object_new (THUNAR_TYPE_LAUNCHER, "widget", GTK_WIDGET (window),
"select-files-closure", window->select_files_closure, NULL);
- window->ui_manager = gtk_ui_manager_new ();
- gtk_ui_manager_add_ui_from_string (window->ui_manager, thunar_window_ui, thunar_window_ui_length, NULL);
-
exo_binding_new (G_OBJECT (window), "current-directory", G_OBJECT (window->launcher), "current-directory");
g_signal_connect_swapped (G_OBJECT (window->launcher), "change-directory", G_CALLBACK (thunar_window_set_current_directory), window);
g_signal_connect_swapped (G_OBJECT (window->launcher), "open-new-tab", G_CALLBACK (thunar_window_notebook_insert), window);
@@ -1294,10 +1271,6 @@ thunar_window_finalize (GObject *object)
g_signal_handlers_disconnect_matched (window->device_monitor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, window);
g_object_unref (window->device_monitor);
- /* disconnect from the ui manager */
- g_signal_handlers_disconnect_matched (window->ui_manager, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, window);
- g_object_unref (window->ui_manager);
-
g_object_unref (window->icon_factory);
g_object_unref (window->launcher);
@@ -1379,10 +1352,6 @@ thunar_window_get_property (GObject *object,
g_value_set_object (value, thunar_window_get_current_directory (window));
break;
- case PROP_UI_MANAGER:
- g_value_set_object (value, window->ui_manager);
- break;
-
case PROP_ZOOM_LEVEL:
g_value_set_enum (value, window->zoom_level);
break;
@@ -1773,9 +1742,6 @@ thunar_window_notebook_switch_page (GtkWidget *notebook,
if (window->view_type != G_TYPE_NONE)
g_object_set (G_OBJECT (window->preferences), "last-view", g_type_name (window->view_type), NULL);
- /* integrate the standard view action in the ui */
- thunar_component_set_ui_manager (THUNAR_COMPONENT (page), window->ui_manager);
-
/* connect to the new history */
history = thunar_standard_view_get_history (THUNAR_STANDARD_VIEW (window->view));
if (history != NULL)
@@ -1784,7 +1750,7 @@ thunar_window_notebook_switch_page (GtkWidget *notebook,
thunar_window_history_changed (window);
}
- /* update the actions */
+ /* update the selection */
thunar_standard_view_selection_changed (THUNAR_STANDARD_VIEW (page));
gtk_widget_grab_focus (page);
@@ -1878,9 +1844,6 @@ thunar_window_notebook_page_removed (GtkWidget *notebook,
/* drop connected signals */
g_signal_handlers_disconnect_matched (page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, window);
- /* remove from the ui */
- thunar_component_set_ui_manager (THUNAR_COMPONENT (page), NULL);
-
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook));
if (n_pages == 0)
{