[gimp/gtk3-port: 446/451] app: remove the option to enable tearoff menus



commit e1a15c8f607adaafeed01a90e038d47a5f634268
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 14 00:34:16 2018 +0200

    app: remove the option to enable tearoff menus

 app/config/gimpguiconfig.c    |   14 --------------
 app/config/gimpguiconfig.h    |    1 -
 app/config/gimprc-blurbs.h    |    3 ---
 app/display/gimpimagewindow.c |    3 +--
 app/gui/gui.c                 |   16 +---------------
 app/tools/gimptexttool.c      |    2 +-
 app/widgets/gimpdockbook.c    |    3 +--
 app/widgets/gimpdockwindow.c  |    3 +--
 app/widgets/gimpeditor.c      |    6 ++----
 app/widgets/gimpmenufactory.c |    6 +-----
 app/widgets/gimpmenufactory.h |    4 +---
 app/widgets/gimptexteditor.c  |    2 +-
 12 files changed, 10 insertions(+), 53 deletions(-)
---
diff --git a/app/config/gimpguiconfig.c b/app/config/gimpguiconfig.c
index 816f4ca..afcf3d7 100644
--- a/app/config/gimpguiconfig.c
+++ b/app/config/gimpguiconfig.c
@@ -64,7 +64,6 @@ enum
   PROP_RESTORE_MONITOR,
   PROP_SAVE_TOOL_OPTIONS,
   PROP_SHOW_TOOLTIPS,
-  PROP_TEAROFF_MENUS,
   PROP_CAN_CHANGE_ACCELS,
   PROP_SAVE_ACCELS,
   PROP_RESTORE_ACCELS,
@@ -236,13 +235,6 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
                             GIMP_PARAM_STATIC_STRINGS |
                             GIMP_CONFIG_PARAM_RESTART);
 
-  GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_TEAROFF_MENUS,
-                            "tearoff-menus",
-                            "Tearoff menus",
-                            TEAROFF_MENUS_BLURB,
-                            TRUE,
-                            GIMP_PARAM_STATIC_STRINGS);
-
   GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_CAN_CHANGE_ACCELS,
                             "can-change-accels",
                             "Can change accelerators",
@@ -615,9 +607,6 @@ gimp_gui_config_set_property (GObject      *object,
     case PROP_SHOW_TOOLTIPS:
       gui_config->show_tooltips = g_value_get_boolean (value);
       break;
-    case PROP_TEAROFF_MENUS:
-      gui_config->tearoff_menus = g_value_get_boolean (value);
-      break;
     case PROP_CAN_CHANGE_ACCELS:
       gui_config->can_change_accels = g_value_get_boolean (value);
       break;
@@ -803,9 +792,6 @@ gimp_gui_config_get_property (GObject    *object,
     case PROP_SHOW_TOOLTIPS:
       g_value_set_boolean (value, gui_config->show_tooltips);
       break;
-    case PROP_TEAROFF_MENUS:
-      g_value_set_boolean (value, gui_config->tearoff_menus);
-      break;
     case PROP_CAN_CHANGE_ACCELS:
       g_value_set_boolean (value, gui_config->can_change_accels);
       break;
diff --git a/app/config/gimpguiconfig.h b/app/config/gimpguiconfig.h
index 7b42549..50caf27 100644
--- a/app/config/gimpguiconfig.h
+++ b/app/config/gimpguiconfig.h
@@ -53,7 +53,6 @@ struct _GimpGuiConfig
   gboolean             restore_monitor;
   gboolean             save_tool_options;
   gboolean             show_tooltips;
-  gboolean             tearoff_menus;
   gboolean             can_change_accels;
   gboolean             save_accels;
   gboolean             restore_accels;
diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h
index 5cd0dd4..1eb9411 100644
--- a/app/config/gimprc-blurbs.h
+++ b/app/config/gimprc-blurbs.h
@@ -429,9 +429,6 @@ _("Sets the swap file location. GIMP uses a tile based memory allocation " \
   "a folder that is mounted over NFS.  For these reasons, it may be " \
   "desirable to put your swap file in \"/tmp\".")
 
-#define TEAROFF_MENUS_BLURB \
-_("When enabled, menus can be torn off.")
-
 #define CAN_CHANGE_ACCELS_BLURB \
 _("When enabled, you can change keyboard shortcuts for menu items " \
   "by hitting a key combination while the menu item is highlighted.")
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 37bb417..9e11f10 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -373,8 +373,7 @@ gimp_image_window_constructed (GObject *object)
 
   private->menubar_manager = gimp_menu_factory_manager_new (menu_factory,
                                                             "<Image>",
-                                                            window,
-                                                            FALSE);
+                                                            window);
 
   g_signal_connect_object (private->dialog_factory, "dock-window-added",
                            G_CALLBACK (gimp_image_window_update_ui_manager),
diff --git a/app/gui/gui.c b/app/gui/gui.c
index 1de5a6c..5dbc6ea 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -131,9 +131,6 @@ static void       gui_user_manual_notify        (GimpGuiConfig      *gui_config,
 static void       gui_single_window_mode_notify (GimpGuiConfig      *gui_config,
                                                  GParamSpec         *pspec,
                                                  GimpUIConfigurer   *ui_configurer);
-static void       gui_tearoff_menus_notify      (GimpGuiConfig      *gui_config,
-                                                 GParamSpec         *pspec,
-                                                 GtkUIManager       *manager);
 
 static void       gui_clipboard_changed         (Gimp               *gimp);
 
@@ -597,8 +594,7 @@ gui_restore_after_callback (Gimp               *gimp,
 
   image_ui_manager = gimp_menu_factory_manager_new (global_menu_factory,
                                                     "<Image>",
-                                                    gimp,
-                                                    gui_config->tearoff_menus);
+                                                    gimp);
   gimp_ui_manager_update (image_ui_manager, gimp);
 
   /* Check that every accelerator is unique. */
@@ -664,9 +660,6 @@ gui_restore_after_callback (Gimp               *gimp,
   g_signal_connect_object (gui_config, "notify::single-window-mode",
                            G_CALLBACK (gui_single_window_mode_notify),
                            ui_configurer, 0);
-  g_signal_connect_object (gui_config, "notify::tearoff-menus",
-                           G_CALLBACK (gui_tearoff_menus_notify),
-                           image_ui_manager, 0);
   g_signal_connect (image_ui_manager, "show-tooltip",
                     G_CALLBACK (gui_menu_show_tooltip),
                     gimp);
@@ -850,13 +843,6 @@ gui_single_window_mode_notify (GimpGuiConfig      *gui_config,
   gimp_ui_configurer_configure (ui_configurer,
                                 gui_config->single_window_mode);
 }
-static void
-gui_tearoff_menus_notify (GimpGuiConfig *gui_config,
-                          GParamSpec    *pspec,
-                          GtkUIManager  *manager)
-{
-  gtk_ui_manager_set_add_tearoffs (manager, gui_config->tearoff_menus);
-}
 
 static void
 gui_clipboard_changed (Gimp *gimp)
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index c5bf02f..b8bf430 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -788,7 +788,7 @@ gimp_text_tool_get_popup (GimpTool         *tool,
           text_tool->ui_manager =
             gimp_menu_factory_manager_new (gimp_dialog_factory_get_menu_factory (dialog_factory),
                                            "<TextTool>",
-                                           text_tool, FALSE);
+                                           text_tool);
 
           im_menu = gtk_ui_manager_get_widget (GTK_UI_MANAGER (text_tool->ui_manager),
                                                "/text-tool-popup/text-tool-input-methods-menu");
diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c
index 32f3690..38eee6b 100644
--- a/app/widgets/gimpdockbook.c
+++ b/app/widgets/gimpdockbook.c
@@ -864,8 +864,7 @@ gimp_dockbook_new (GimpMenuFactory *menu_factory)
 
   dockbook->p->ui_manager = gimp_menu_factory_manager_new (menu_factory,
                                                            "<Dockable>",
-                                                           dockbook,
-                                                           FALSE);
+                                                           dockbook);
 
   gimp_help_connect (GTK_WIDGET (dockbook), gimp_dockbook_help_func,
                      GIMP_HELP_DOCK, dockbook);
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index 88cdd71..572b07a 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -325,8 +325,7 @@ gimp_dock_window_constructed (GObject *object)
   dock_window->p->ui_manager =
     gimp_menu_factory_manager_new (menu_factory,
                                    dock_window->p->ui_manager_name,
-                                   dock_window,
-                                   config->tearoff_menus);
+                                   dock_window);
   accel_group =
     gtk_ui_manager_get_accel_group (GTK_UI_MANAGER (dock_window->p->ui_manager));
   gtk_window_add_accel_group (GTK_WINDOW (dock_window), accel_group);
diff --git a/app/widgets/gimpeditor.c b/app/widgets/gimpeditor.c
index 47bdc19..b7548b6 100644
--- a/app/widgets/gimpeditor.c
+++ b/app/widgets/gimpeditor.c
@@ -251,8 +251,7 @@ gimp_editor_constructed (GObject *object)
       editor->priv->ui_manager =
         gimp_menu_factory_manager_new (editor->priv->menu_factory,
                                        editor->priv->menu_identifier,
-                                       editor->priv->popup_data,
-                                       FALSE);
+                                       editor->priv->popup_data);
       g_signal_connect (editor->priv->ui_manager->gimp->config,
                         "size-changed",
                         G_CALLBACK (gimp_editor_config_size_changed),
@@ -451,8 +450,7 @@ gimp_editor_create_menu (GimpEditor      *editor,
 
   editor->priv->ui_manager = gimp_menu_factory_manager_new (menu_factory,
                                                             menu_identifier,
-                                                            popup_data,
-                                                            FALSE);
+                                                            popup_data);
   g_signal_connect (editor->priv->ui_manager->gimp->config,
                     "size-changed",
                     G_CALLBACK (gimp_editor_config_size_changed),
diff --git a/app/widgets/gimpmenufactory.c b/app/widgets/gimpmenufactory.c
index 9db82b8..8675d52 100644
--- a/app/widgets/gimpmenufactory.c
+++ b/app/widgets/gimpmenufactory.c
@@ -203,8 +203,7 @@ gimp_menu_factory_manager_action_added (GimpActionGroup *group,
 GimpUIManager *
 gimp_menu_factory_manager_new (GimpMenuFactory *factory,
                                const gchar     *identifier,
-                               gpointer         callback_data,
-                               gboolean         create_tearoff)
+                               gpointer         callback_data)
 {
   GList *list;
 
@@ -222,9 +221,6 @@ gimp_menu_factory_manager_new (GimpMenuFactory *factory,
           GList         *list;
 
           manager = gimp_ui_manager_new (factory->p->gimp, entry->identifier);
-          gtk_ui_manager_set_add_tearoffs (GTK_UI_MANAGER (manager),
-                                           create_tearoff);
-
           accel_group = gtk_ui_manager_get_accel_group (GTK_UI_MANAGER (manager));
 
           for (list = entry->action_groups; list; list = g_list_next (list))
diff --git a/app/widgets/gimpmenufactory.h b/app/widgets/gimpmenufactory.h
index 0202b89..eeed462 100644
--- a/app/widgets/gimpmenufactory.h
+++ b/app/widgets/gimpmenufactory.h
@@ -69,9 +69,7 @@ void              gimp_menu_factory_manager_register     (GimpMenuFactory   *fac
 GList           * gimp_menu_factory_get_registered_menus (GimpMenuFactory   *factory);
 GimpUIManager   * gimp_menu_factory_manager_new          (GimpMenuFactory   *factory,
                                                           const gchar       *identifier,
-                                                          gpointer           callback_data,
-                                                          gboolean           create_tearoff);
-
+                                                          gpointer           callback_data);
 
 
 #endif  /*  __GIMP_MENU_FACTORY_H__  */
diff --git a/app/widgets/gimptexteditor.c b/app/widgets/gimptexteditor.c
index 2276b9c..0836650 100644
--- a/app/widgets/gimptexteditor.c
+++ b/app/widgets/gimptexteditor.c
@@ -177,7 +177,7 @@ gimp_text_editor_new (const gchar     *title,
 
   editor->ui_manager = gimp_menu_factory_manager_new (menu_factory,
                                                       "<TextEditor>",
-                                                      editor, FALSE);
+                                                      editor);
 
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (editor));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]