[gtranslator] Remove toolbareditor



commit 5823a3fed25d87b01d26268d700b9dc7dc7c48a4
Author: Daniel GarcĂ­a Moreno <danigm wadobo com>
Date:   Tue Sep 11 12:52:02 2018 +0200

    Remove toolbareditor
    
    We don't use the toolbareditor so I'm removing it.

 src/gtr-application.c                              |   56 -
 src/gtr-application.h                              |    4 -
 src/meson.build                                    |    4 +-
 src/toolbareditor/egg-editable-toolbar.c           | 1935 --------------------
 src/toolbareditor/egg-editable-toolbar.h           |   94 -
 src/toolbareditor/egg-toolbar-editor.c             |  674 -------
 src/toolbareditor/egg-toolbar-editor.h             |   63 -
 src/toolbareditor/egg-toolbars-model.c             | 1000 ----------
 src/toolbareditor/egg-toolbars-model.h             |  189 --
 src/toolbareditor/eggmarshalers.list               |    1 -
 src/toolbareditor/meson.build                      |   46 -
 .../update-toolbareditor-from-libegg.sh            |   33 -
 12 files changed, 1 insertion(+), 4098 deletions(-)
---
diff --git a/src/gtr-application.c b/src/gtr-application.c
index 696f18a4..5e725651 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -34,7 +34,6 @@
 #include "gtr-utils.h"
 #include "gtr-window.h"
 #include "gtr-preferences-dialog.h"
-#include "egg-toolbars-model.h"
 
 #include <glib.h>
 #include <glib-object.h>
@@ -64,9 +63,6 @@ struct _GtrApplicationPrivate
 
   GtrWindow *active_window;
 
-  gchar *toolbars_file;
-  EggToolbarsModel *toolbars_model;
-
   GtkIconFactory *icon_factory;
 
   gchar *last_dir;
@@ -172,7 +168,6 @@ gtr_application_init (GtrApplication *application)
 {
   GtrApplicationPrivate *priv;
   const gchar *gtr_folder;
-  gchar *path_default_gtr_toolbar;
   gchar *profiles_file;
 
   application->priv = GTR_APPLICATION_GET_PRIVATE (application);
@@ -196,28 +191,6 @@ gtr_application_init (GtrApplication *application)
     priv->first_run = TRUE;
   g_free (profiles_file);
 
-  priv->toolbars_model = egg_toolbars_model_new ();
-
-  priv->toolbars_file = g_build_filename (gtr_folder,
-                                          "gtr-toolbar.xml", NULL);
-
-  path_default_gtr_toolbar = gtr_dirs_get_ui_file ("gtr-toolbar.xml");
-
-  egg_toolbars_model_load_names (priv->toolbars_model,
-                                 path_default_gtr_toolbar);
-
-  if (!egg_toolbars_model_load_toolbars (priv->toolbars_model,
-                                         priv->toolbars_file))
-    {
-      egg_toolbars_model_load_toolbars (priv->toolbars_model,
-                                        path_default_gtr_toolbar);
-    }
-
-  g_free (path_default_gtr_toolbar);
-
-  egg_toolbars_model_set_flags (priv->toolbars_model, 0,
-                                EGG_TB_MODEL_NOT_REMOVABLE);
-
   load_accels ();
 
   /* Create Icon factory */
@@ -233,7 +206,6 @@ gtr_application_dispose (GObject * object)
   g_clear_object (&priv->settings);
   g_clear_object (&priv->window_settings);
   g_clear_object (&priv->icon_factory);
-  g_clear_object (&priv->toolbars_model);
 
   G_OBJECT_CLASS (gtr_application_parent_class)->dispose (object);
 }
@@ -244,7 +216,6 @@ gtr_application_finalize (GObject *object)
   GtrApplication *app = GTR_APPLICATION (object);
 
   g_free (app->priv->last_dir);
-  g_free (app->priv->toolbars_file);
 
   G_OBJECT_CLASS (gtr_application_parent_class)->finalize (object);
 }
@@ -605,33 +576,6 @@ gtr_application_create_window (GtrApplication *app)
   return window;
 }
 
-/**
- * _gtr_application_get_toolbars_model:
- * @application: a #GtrApplication
- * 
- * Returns the toolbar model.
- * 
- * Returns: the toolbar model.
- */
-GObject *
-_gtr_application_get_toolbars_model (GtrApplication * application)
-{
-  return G_OBJECT (application->priv->toolbars_model);
-}
-
-/**
- * _gtr_application_save_toolbars_model:
- * @application: a #GtrApplication
- * 
- * Saves the toolbar model.
- */
-void
-_gtr_application_save_toolbars_model (GtrApplication * application)
-{
-  egg_toolbars_model_save_toolbars (application->priv->toolbars_model,
-                                    application->priv->toolbars_file, "1.0");
-}
-
 /**
  * gtr_application_get_views:
  * @app: the #GtranslationApplication
diff --git a/src/gtr-application.h b/src/gtr-application.h
index 1e68a8ca..b3033a75 100644
--- a/src/gtr-application.h
+++ b/src/gtr-application.h
@@ -74,10 +74,6 @@ void              gtr_application_register_icon          (GtrApplication *app,
                                                           const gchar    *stock_id);
 
 /* Non exported funcs */
-GObject         *_gtr_application_get_toolbars_model     (GtrApplication *application);
-
-void             _gtr_application_save_toolbars_model    (GtrApplication *application);
-
 const gchar     *_gtr_application_get_last_dir           (GtrApplication *app);
 
 void             _gtr_application_set_last_dir           (GtrApplication *app,
diff --git a/src/meson.build b/src/meson.build
index 5401513a..e2c24ad9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -116,11 +116,9 @@ sources += gnome.compile_resources(
 
 incs = [
   top_inc,
-  include_directories('toolbareditor'),
   include_directories('translation-memory'),
 ]
 
-subdir('toolbareditor')
 subdir('translation-memory')
 
 
@@ -132,7 +130,7 @@ executable(
   meson.project_name(),
    sources + files('main.c'),
    include_directories: incs,
-          dependencies: gtranslator_deps + [toolbareditor_dep],
+          dependencies: gtranslator_deps,
                install: true,
            install_dir: gtranslator_bindir
 )


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