Commit b6df15b8 authored by Alexander Schwinn's avatar Alexander Schwinn
Browse files

remove all GtkActionEntries, they are not used any more (Bug #16654)

parent 4542272e
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
@@ -121,28 +121,6 @@ struct _ThunarAbstractIconViewPrivate
};



static const GtkActionEntry action_entries[] =
{
  { "arrange-items-menu", NULL, N_ ("Arran_ge Items"), NULL, NULL, NULL, },
};

static const GtkRadioActionEntry column_action_entries[] =
{
  { "sort-by-name", NULL, N_ ("Sort By _Name"), NULL, N_ ("Keep items sorted by their name"), THUNAR_COLUMN_NAME, },
  { "sort-by-size", NULL, N_ ("Sort By _Size"), NULL, N_ ("Keep items sorted by their size"), THUNAR_COLUMN_SIZE, },
  { "sort-by-type", NULL, N_ ("Sort By _Type"), NULL, N_ ("Keep items sorted by their type"), THUNAR_COLUMN_TYPE, },
  { "sort-by-mtime", NULL, N_ ("Sort By Modification _Date"), NULL, N_ ("Keep items sorted by their modification date"), THUNAR_COLUMN_DATE_MODIFIED, },
};

static const GtkRadioActionEntry order_action_entries[] =
{
  { "sort-ascending", NULL, N_ ("_Ascending"), NULL, N_ ("Sort items in ascending order"), GTK_SORT_ASCENDING, },
  { "sort-descending", NULL, N_ ("_Descending"), NULL, N_ ("Sort items in descending order"), GTK_SORT_DESCENDING, },
};



static XfceGtkActionEntry thunar_abstract_icon_view_action_entries[] =
{
    { THUNAR_ABSTRACT_ICON_VIEW_ACTION_ARRANGE_ITEMS_MENU, "<Actions>/ThunarStandardView/arrange-items-menu",    "", XFCE_GTK_MENU_ITEM,       N_ ("Arran_ge Items"),             NULL,                                                NULL, G_CALLBACK (NULL),                                             },
@@ -257,19 +235,6 @@ thunar_abstract_icon_view_init (ThunarAbstractIconView *abstract_icon_view)
  gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (view), THUNAR_STANDARD_VIEW (abstract_icon_view)->name_renderer,
                                 "text", THUNAR_COLUMN_NAME);

G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  /* setup the abstract icon view actions */
  gtk_action_group_add_actions (THUNAR_STANDARD_VIEW (abstract_icon_view)->action_group,
                                action_entries, G_N_ELEMENTS (action_entries),
                                GTK_WIDGET (abstract_icon_view));
  gtk_action_group_add_radio_actions (THUNAR_STANDARD_VIEW (abstract_icon_view)->action_group, column_action_entries,
                                      G_N_ELEMENTS (column_action_entries), THUNAR_COLUMN_NAME,
                                      G_CALLBACK (NULL), abstract_icon_view);
  gtk_action_group_add_radio_actions (THUNAR_STANDARD_VIEW (abstract_icon_view)->action_group, order_action_entries,
                                      G_N_ELEMENTS (order_action_entries), GTK_SORT_ASCENDING,
                                      G_CALLBACK (NULL), abstract_icon_view);
G_GNUC_END_IGNORE_DEPRECATIONS

  /* we need to listen to sort column changes to sync the menu items */
  g_signal_connect (G_OBJECT (THUNAR_STANDARD_VIEW (abstract_icon_view)->model), "sort-column-changed",
                    G_CALLBACK (thunar_abstract_icon_view_sort_column_changed), abstract_icon_view);
+0 −71
Original line number Diff line number Diff line
@@ -173,16 +173,7 @@ struct _ThunarLauncher
  ThunarFile             *current_directory;
  GList                  *selected_files;

  GtkActionGroup         *action_group;
  GtkUIManager           *ui_manager;
  guint                   ui_merge_id;
  guint                   ui_addons_merge_id;

  GtkAction              *action_open;
  GtkAction              *action_open_with_other;
  GtkAction              *action_open_in_new_window;
  GtkAction              *action_open_in_new_tab;
  GtkAction              *action_open_with_other_in_menu;

  gint                    n_selected_files;
  gint                    n_selected_directories;
@@ -215,19 +206,6 @@ struct _ThunarLauncherPokeData
  ThunarLauncherFolderOpenAction  folder_open_action;
};



static const GtkActionEntry action_entries[] =
{
  { "open", "document-open", N_ ("_Open"), "<control>O", NULL, G_CALLBACK (NULL), },
  { "open-in-new-tab", NULL, N_ ("Open in New _Tab"), "<control><shift>P", NULL, G_CALLBACK (NULL), },
  { "open-in-new-window", NULL, N_ ("Open in New _Window"), "<control><shift>O", NULL, G_CALLBACK (NULL), },
  { "open-with-other", NULL, N_ ("Open With Other _Application..."), NULL, N_ ("Choose another application with which to open the selected file"), G_CALLBACK (NULL), },
  { "open-with-menu", NULL, N_ ("Open With"), NULL, NULL, NULL, },
  { "open-with-other-in-menu", NULL, N_ ("Open With Other _Application..."), NULL, N_ ("Choose another application with which to open the selected file"), G_CALLBACK (NULL), },
  { "sendto-desktop", "user-desktop", "", NULL, NULL, G_CALLBACK (NULL), },
};

static GParamSpec *launcher_props[N_PROPERTIES] = { NULL, };

static XfceGtkActionEntry thunar_launcher_action_entries[] =
@@ -362,20 +340,6 @@ thunar_launcher_navigator_init (ThunarNavigatorIface *iface)
static void
thunar_launcher_init (ThunarLauncher *launcher)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  /* setup the action group for the launcher actions */
  launcher->action_group = gtk_action_group_new ("ThunarLauncher");
  gtk_action_group_set_translation_domain (launcher->action_group, GETTEXT_PACKAGE);
  gtk_action_group_add_actions (launcher->action_group, action_entries, G_N_ELEMENTS (action_entries), launcher);

  /* determine references to our actions */
  launcher->action_open = gtk_action_group_get_action (launcher->action_group, "open");
  launcher->action_open_with_other = gtk_action_group_get_action (launcher->action_group, "open-with-other");
  launcher->action_open_in_new_window = gtk_action_group_get_action (launcher->action_group, "open-in-new-window");
  launcher->action_open_in_new_tab = gtk_action_group_get_action (launcher->action_group, "open-in-new-tab");
  launcher->action_open_with_other_in_menu = gtk_action_group_get_action (launcher->action_group, "open-with-other-in-menu");
G_GNUC_END_IGNORE_DEPRECATIONS

  launcher->selected_files = NULL;
  launcher->select_files_closure = NULL;

@@ -416,9 +380,6 @@ thunar_launcher_finalize (GObject *object)
  /* release the preferences reference */
  g_object_unref (launcher->preferences);

  /* release the reference on the action group */
  g_object_unref (launcher->action_group);

  (*G_OBJECT_CLASS (thunar_launcher_parent_class)->finalize) (object);
}

@@ -643,26 +604,10 @@ thunar_launcher_set_ui_manager (ThunarComponent *component,
                                GtkUIManager    *ui_manager)
{
  ThunarLauncher *launcher = THUNAR_LAUNCHER (component);
  GError         *error = NULL;

  /* disconnect from the previous UI manager */
  if (G_UNLIKELY (launcher->ui_manager != NULL))
    {
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
      /* drop our action group from the previous UI manager */
      gtk_ui_manager_remove_action_group (launcher->ui_manager, launcher->action_group);

      /* unmerge our addons ui controls from the previous UI manager */
      if (G_LIKELY (launcher->ui_addons_merge_id != 0))
        {
          gtk_ui_manager_remove_ui (launcher->ui_manager, launcher->ui_addons_merge_id);
          launcher->ui_addons_merge_id = 0;
        }

      /* unmerge our ui controls from the previous UI manager */
      gtk_ui_manager_remove_ui (launcher->ui_manager, launcher->ui_merge_id);
G_GNUC_END_IGNORE_DEPRECATIONS

      /* drop the reference on the previous UI manager */
      g_object_unref (G_OBJECT (launcher->ui_manager));
    }
@@ -675,22 +620,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
    {
      /* we keep a reference on the new manager */
      g_object_ref (G_OBJECT (ui_manager));

G_GNUC_BEGIN_IGNORE_DEPRECATIONS
      /* add our action group to the new manager */
      gtk_ui_manager_insert_action_group (ui_manager, launcher->action_group, -1);

      /* merge our UI control items with the new manager */
      launcher->ui_merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, thunar_launcher_ui, thunar_launcher_ui_length, &error);
G_GNUC_END_IGNORE_DEPRECATIONS
      if (G_UNLIKELY (launcher->ui_merge_id == 0))
        {
          g_error ("Failed to merge ThunarLauncher menus: %s", error->message);
          g_error_free (error);
        }

      /* update the user interface */
      //thunar_launcher_update (launcher);
    }

  /* notify listeners */
+0 −35
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@
#include <thunar/thunar-private.h>
#include <thunar/thunar-properties-dialog.h>
#include <thunar/thunar-renamer-dialog.h>
#include <thunar/thunar-renamer-dialog-ui.h>
#include <thunar/thunar-renamer-model.h>
#include <thunar/thunar-renamer-progress.h>

@@ -166,7 +165,6 @@ struct _ThunarRenamerDialog

  ThunarLauncher      *launcher;

  GtkActionGroup      *action_group;
  GtkUIManager        *ui_manager;

  GtkWidget           *cancel_button;
@@ -192,20 +190,6 @@ struct _ThunarRenamerDialog



static const GtkActionEntry action_entries[] =
{
  { "file-menu", NULL, N_ ("_File"), NULL, },
  { "sendto-menu", NULL, N_ ("_Send To"), NULL, },
  { "file-context-menu", NULL, N_ ("File Context Menu"), NULL, },
  { "add-files", "list-add", N_ ("_Add Files..."), NULL, N_ ("Include additional files in the list of files to be renamed"), G_CALLBACK (NULL), },
  { "remove-files", "list-remove", NULL, NULL, NULL, G_CALLBACK (NULL), },
  { "clear", "edit-clear", N_ ("Clear"), NULL, N_ ("Clear the file list below"), G_CALLBACK (NULL), },
  { "about", "help-about", N_ ("_About"), NULL, N_ ("Display information about Thunar Bulk Rename"), G_CALLBACK (NULL), },
  { "properties", "document-properties", N_ ("_Properties..."), "<alt>Return", N_ ("View the properties of the selected file"), G_CALLBACK (NULL), },
};



static XfceGtkActionEntry thunar_renamer_action_entries[] =
{
    { THUNAR_RENAMER_ACTION_ADD_FILES,    "<Actions>/ThunarRenamerDialog/add-files",    "", XFCE_GTK_IMAGE_MENU_ITEM, N_ ("_Add Files..."), N_ ("Include additional files in the list of files to be renamed"), "list-add",    G_CALLBACK (thunar_renamer_dialog_action_add_files),   },
@@ -323,7 +307,6 @@ thunar_renamer_dialog_init (ThunarRenamerDialog *renamer_dialog)
  GtkTreeViewColumn      *column;
  GtkTreeSelection       *selection;
  GtkCellRenderer        *renderer;
  GtkAccelGroup          *accel_group;
  GtkSizeGroup           *size_group;
  const gchar            *active_str;
  GHashTable             *settings;
@@ -384,22 +367,6 @@ thunar_renamer_dialog_init (ThunarRenamerDialog *renamer_dialog)
  gtk_dialog_set_default_response (GTK_DIALOG (renamer_dialog), GTK_RESPONSE_ACCEPT);
  gtk_widget_set_tooltip_text (button, _("Click here to actually rename the files listed above to their new names."));

G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  /* setup the action group for this dialog */
  renamer_dialog->action_group = gtk_action_group_new ("ThunarRenamerDialog");
  gtk_action_group_set_translation_domain (renamer_dialog->action_group, GETTEXT_PACKAGE);
  gtk_action_group_add_actions (renamer_dialog->action_group, action_entries, G_N_ELEMENTS (action_entries), GTK_WIDGET (renamer_dialog));

  /* setup the UI manager for this dialog */
  renamer_dialog->ui_manager = gtk_ui_manager_new ();
  gtk_ui_manager_insert_action_group (renamer_dialog->ui_manager, renamer_dialog->action_group, 0);
  gtk_ui_manager_add_ui_from_string (renamer_dialog->ui_manager, thunar_renamer_dialog_ui, thunar_renamer_dialog_ui_length, NULL);

  /* connect the accelerators */
  accel_group = gtk_ui_manager_get_accel_group (renamer_dialog->ui_manager);
  gtk_window_add_accel_group (GTK_WINDOW (renamer_dialog), accel_group);
G_GNUC_END_IGNORE_DEPRECATIONS

  /* 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);
@@ -677,8 +644,6 @@ thunar_renamer_dialog_finalize (GObject *object)
  /* release the launcher support */
  g_object_unref (G_OBJECT (renamer_dialog->launcher));

  /* release the action group and the ui manager */
  g_object_unref (G_OBJECT (renamer_dialog->action_group));
  g_object_unref (G_OBJECT (renamer_dialog->ui_manager));

  /* release our bulk rename model */
+0 −43
Original line number Diff line number Diff line
@@ -81,9 +81,7 @@ struct _ThunarShortcutsPane
  ThunarFile       *current_directory;
  GList            *selected_files;

  GtkActionGroup   *action_group;
  GtkUIManager     *ui_manager;
  guint             ui_merge_id;

  GtkWidget        *view;

@@ -92,13 +90,6 @@ struct _ThunarShortcutsPane



static const GtkActionEntry action_entries[] =
{
  { "sendto-shortcuts", "bookmark-new", "", NULL, NULL, G_CALLBACK (NULL), },
};



G_DEFINE_TYPE_WITH_CODE (ThunarShortcutsPane, thunar_shortcuts_pane, GTK_TYPE_SCROLLED_WINDOW,
    G_IMPLEMENT_INTERFACE (THUNAR_TYPE_NAVIGATOR, thunar_shortcuts_pane_navigator_init)
    G_IMPLEMENT_INTERFACE (THUNAR_TYPE_COMPONENT, thunar_shortcuts_pane_component_init)
@@ -164,13 +155,6 @@ thunar_shortcuts_pane_init (ThunarShortcutsPane *shortcuts_pane)
{
  GtkWidget *vscrollbar;

  /* setup the action group for the shortcuts actions */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  shortcuts_pane->action_group = gtk_action_group_new ("ThunarShortcutsPane");
  gtk_action_group_set_translation_domain (shortcuts_pane->action_group, GETTEXT_PACKAGE);
  gtk_action_group_add_actions (shortcuts_pane->action_group, action_entries, G_N_ELEMENTS (action_entries), shortcuts_pane);
G_GNUC_END_IGNORE_DEPRECATIONS

  /* configure the GtkScrolledWindow */
  gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW (shortcuts_pane), NULL);
  gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (shortcuts_pane), NULL);
@@ -217,11 +201,6 @@ thunar_shortcuts_pane_dispose (GObject *object)
static void
thunar_shortcuts_pane_finalize (GObject *object)
{
  ThunarShortcutsPane *shortcuts_pane = THUNAR_SHORTCUTS_PANE (object);

  /* release our action group */
  g_object_unref (G_OBJECT (shortcuts_pane->action_group));

  (*G_OBJECT_CLASS (thunar_shortcuts_pane_parent_class)->finalize) (object);
}

@@ -396,19 +375,10 @@ thunar_shortcuts_pane_set_ui_manager (ThunarComponent *component,
                                      GtkUIManager    *ui_manager)
{
  ThunarShortcutsPane *shortcuts_pane = THUNAR_SHORTCUTS_PANE (component);
  GError              *error = NULL;

  /* disconnect from the previous UI manager */
  if (G_UNLIKELY (shortcuts_pane->ui_manager != NULL))
    {
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
      /* drop our action group from the previous UI manager */
      gtk_ui_manager_remove_action_group (shortcuts_pane->ui_manager, shortcuts_pane->action_group);

      /* unmerge our ui controls from the previous UI manager */
      gtk_ui_manager_remove_ui (shortcuts_pane->ui_manager, shortcuts_pane->ui_merge_id);
G_GNUC_END_IGNORE_DEPRECATIONS

      /* drop our reference on the previous UI manager */
      g_object_unref (G_OBJECT (shortcuts_pane->ui_manager));
    }
@@ -421,19 +391,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
    {
      /* we keep a reference on the new manager */
      g_object_ref (G_OBJECT (ui_manager));

G_GNUC_BEGIN_IGNORE_DEPRECATIONS
      /* add our action group to the new manager */
      gtk_ui_manager_insert_action_group (ui_manager, shortcuts_pane->action_group, -1);

      /* merge our UI control items with the new manager */
      shortcuts_pane->ui_merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, thunar_shortcuts_pane_ui, thunar_shortcuts_pane_ui_length, &error);
G_GNUC_END_IGNORE_DEPRECATIONS
      if (G_UNLIKELY (shortcuts_pane->ui_merge_id == 0))
        {
          g_error ("Failed to merge ThunarShortcutsPane menus: %s", error->message);
          g_error_free (error);
        }
    }

  /* notify listeners */
+0 −94
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@
#include <thunar/thunar-renamer-dialog.h>
#include <thunar/thunar-simple-job.h>
#include <thunar/thunar-standard-view.h>
#include <thunar/thunar-standard-view-ui.h>
#include <thunar/thunar-thumbnailer.h>
#include <thunar/thunar-util.h>

@@ -275,20 +274,6 @@ struct _ThunarStandardViewPrivate
  /* current directory of the view */
  ThunarFile             *current_directory;

  GtkAction              *action_create_folder;
  GtkAction              *action_create_document;
  GtkAction              *action_properties;
  GtkAction              *action_cut;
  GtkAction              *action_copy;
  GtkAction              *action_paste;
  GtkAction              *action_move_to_trash;
  GtkAction              *action_delete;
  GtkAction              *action_paste_into_folder;
  GtkAction              *action_duplicate;
  GtkAction              *action_make_link;
  GtkAction              *action_rename;
  GtkAction              *action_restore;

  /* history of the current view */
  ThunarHistory          *history;

@@ -354,28 +339,6 @@ struct _ThunarStandardViewPrivate
  GtkTreePath            *selection_before_delete;
};



static const GtkActionEntry action_entries[] =
{
  { "file-context-menu", NULL, N_ ("File Context Menu"), NULL, NULL, NULL, },
  { "folder-context-menu", NULL, N_ ("Folder Context Menu"), NULL, NULL, NULL, },
  { "create-folder", "folder-new", N_ ("Create _Folder..."), "<control><shift>N", N_ ("Create an empty folder within the current folder"), G_CALLBACK (NULL), },
  { "properties", "document-properties", N_ ("_Properties..."), "<alt>Return", N_ ("View the properties of the selected file"), G_CALLBACK (NULL), },
  { "cut", "edit-cut", N_ ("Cu_t"), "<control>X", NULL, G_CALLBACK (NULL), },
  { "copy", "edit-copy", N_ ("_Copy"), "<control>C", NULL, G_CALLBACK (NULL), },
  { "paste", "edit-paste", N_ ("_Paste"), "<control>V", N_ ("Move or copy files previously selected by a Cut or Copy command"), G_CALLBACK (NULL), },
  { "move-to-trash", "user-trash", N_ ("Mo_ve to Trash"), NULL, NULL, G_CALLBACK (NULL), },
  { "delete", "edit-delete", N_ ("_Delete"), NULL, NULL, G_CALLBACK (NULL), },
  { "paste-into-folder", "edit-paste", N_ ("Paste Into Folder"), NULL, N_ ("Move or copy files previously selected by a Cut or Copy command into the selected folder"), G_CALLBACK (NULL), },
  { "select-all-files", NULL, N_ ("Select _all Files"), NULL, N_ ("Select all files in this window"), G_CALLBACK (NULL), },
  { "select-by-pattern", NULL, N_ ("Select _by Pattern..."), "<control>S", N_ ("Select all files that match a certain pattern"), G_CALLBACK (NULL), },
  { "invert-selection", NULL, N_ ("_Invert Selection"), NULL, N_ ("Select all files but not those currently selected"), G_CALLBACK (NULL), },
  { "duplicate", NULL, N_ ("Du_plicate"), NULL, NULL, G_CALLBACK (NULL), },
  { "make-link", NULL, N_ ("Ma_ke Link"), NULL, NULL, G_CALLBACK (NULL), },
  { "rename", NULL, N_ ("_Rename..."), "F2", NULL, G_CALLBACK (NULL), },
  { "restore", NULL, N_ ("_Restore"), NULL, NULL, G_CALLBACK (NULL), },
};
static XfceGtkActionEntry thunar_standard_view_action_entries[] =
{
    { THUNAR_STANDARD_VIEW_ACTION_SELECT_ALL_FILES,  "<Actions>/ThunarStandardView/select-all-files",   "<Primary>a", XFCE_GTK_MENU_ITEM, N_ ("Select _all Files"),     N_ ("Select all files in this window"),                   NULL, G_CALLBACK (thunar_standard_view_select_all_files), },
@@ -620,40 +583,6 @@ thunar_standard_view_init (ThunarStandardView *standard_view)
  gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (standard_view), NULL);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (standard_view), GTK_SHADOW_IN);

G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  /* setup the action group for this view */
  standard_view->action_group = gtk_action_group_new ("ThunarStandardView");
  gtk_action_group_set_translation_domain (standard_view->action_group, GETTEXT_PACKAGE);
  gtk_action_group_add_actions (standard_view->action_group, action_entries,
                                G_N_ELEMENTS (action_entries),
                                GTK_WIDGET (standard_view));

  /* lookup all actions to speed up access later */
  standard_view->priv->action_create_folder = gtk_action_group_get_action (standard_view->action_group, "create-folder");
  standard_view->priv->action_properties = gtk_action_group_get_action (standard_view->action_group, "properties");
  standard_view->priv->action_cut = gtk_action_group_get_action (standard_view->action_group, "cut");
  standard_view->priv->action_copy = gtk_action_group_get_action (standard_view->action_group, "copy");
  standard_view->priv->action_paste = gtk_action_group_get_action (standard_view->action_group, "paste");
  standard_view->priv->action_move_to_trash = gtk_action_group_get_action (standard_view->action_group, "move-to-trash");
  standard_view->priv->action_delete = gtk_action_group_get_action (standard_view->action_group, "delete");
  standard_view->priv->action_paste_into_folder = gtk_action_group_get_action (standard_view->action_group, "paste-into-folder");
  standard_view->priv->action_duplicate = gtk_action_group_get_action (standard_view->action_group, "duplicate");
  standard_view->priv->action_make_link = gtk_action_group_get_action (standard_view->action_group, "make-link");
  standard_view->priv->action_rename = gtk_action_group_get_action (standard_view->action_group, "rename");
  standard_view->priv->action_restore = gtk_action_group_get_action (standard_view->action_group, "restore");
G_GNUC_END_IGNORE_DEPRECATIONS

  /* add the "Create Document" sub menu action */
  //standard_view->priv->action_create_document = thunar_templates_action_new ("create-document", _("Create _Document"));
  g_signal_connect (G_OBJECT (standard_view->priv->action_create_document), "create-empty-file",
                    G_CALLBACK (NULL), standard_view);
  g_signal_connect (G_OBJECT (standard_view->priv->action_create_document), "create-template",
                    G_CALLBACK (NULL), standard_view);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  gtk_action_group_add_action (standard_view->action_group, standard_view->priv->action_create_document);
G_GNUC_END_IGNORE_DEPRECATIONS
  g_object_unref (G_OBJECT (standard_view->priv->action_create_document));

  /* setup the history support */
  standard_view->priv->history = g_object_new (THUNAR_TYPE_HISTORY, NULL);
  g_signal_connect_swapped (G_OBJECT (standard_view->priv->history), "change-directory", G_CALLBACK (thunar_navigator_change_directory), standard_view);
@@ -844,7 +773,6 @@ thunar_standard_view_finalize (GObject *object)
  /* some safety checks */
  _thunar_assert (standard_view->loading_binding == NULL);
  _thunar_assert (standard_view->icon_factory == NULL);
  _thunar_assert (standard_view->ui_manager == NULL);

  /* Dont listen to the accel keys defined by the action entries any more */
  xfce_gtk_accel_group_disconnect_action_entries (standard_view->accel_group,
@@ -880,9 +808,6 @@ thunar_standard_view_finalize (GObject *object)
  /* release the reference on the icon renderer */
  g_object_unref (G_OBJECT (standard_view->icon_renderer));

  /* release the reference on the action group */
  g_object_unref (G_OBJECT (standard_view->action_group));

  /* drop any existing "new-files" closure */
  if (G_UNLIKELY (standard_view->priv->new_files_closure != NULL))
    {
@@ -1211,7 +1136,6 @@ thunar_standard_view_set_ui_manager (ThunarComponent *component,
                                     GtkUIManager    *ui_manager)
{
  ThunarStandardView *standard_view = THUNAR_STANDARD_VIEW (component);
  GError             *error = NULL;

  /* leave if nothing changed */
  if (standard_view->ui_manager == ui_manager)
@@ -1221,15 +1145,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  /* disconnect from the previous UI manager */
  if (G_LIKELY (standard_view->ui_manager != NULL))
    {
      /* drop our action group from the previous UI manager */
      gtk_ui_manager_remove_action_group (standard_view->ui_manager, standard_view->action_group);

      /* unmerge the ui controls from derived classes */
      (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->disconnect_ui_manager) (standard_view, standard_view->ui_manager);

      /* unmerge our ui controls from the previous UI manager */
      gtk_ui_manager_remove_ui (standard_view->ui_manager, standard_view->ui_merge_id);

      /* force update to remove all actions and proxies */
      gtk_ui_manager_ensure_update (standard_view->ui_manager);

@@ -1246,18 +1164,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
      /* we keep a reference on the new manager */
      g_object_ref (G_OBJECT (ui_manager));

      /* add our action group to the new manager */
      gtk_ui_manager_insert_action_group (ui_manager, standard_view->action_group, -1);

      /* merge our UI control items with the new manager */
      standard_view->ui_merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, thunar_standard_view_ui,
                                                                      thunar_standard_view_ui_length, &error);
      if (G_UNLIKELY (standard_view->ui_merge_id == 0))
        {
          g_error ("Failed to merge ThunarStandardView menus: %s", error->message);
          g_error_free (error);
        }

      /* merge the ui controls from derived classes */
      (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->connect_ui_manager) (standard_view, ui_manager);

Loading