[gedit] spell-language-dialog: remove unused data_dir parameter



commit ca5015c457fd26899192e69a1db8aa745a779fd4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Jul 21 18:28:34 2015 +0200

    spell-language-dialog: remove unused data_dir parameter
    
    It was probably used to load the .ui file, but it is now loaded from a
    GResource.

 plugins/spell/gedit-spell-language-dialog.c |    8 +++-----
 plugins/spell/gedit-spell-language-dialog.h |    3 +--
 plugins/spell/gedit-spell-plugin.c          |    7 +------
 3 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-language-dialog.c b/plugins/spell/gedit-spell-language-dialog.c
index db386e6..00eaddb 100644
--- a/plugins/spell/gedit-spell-language-dialog.c
+++ b/plugins/spell/gedit-spell-language-dialog.c
@@ -104,8 +104,7 @@ language_row_activated (GtkTreeView *tree_view,
 }
 
 static void
-create_dialog (GeditSpellLanguageDialog *dialog,
-              const gchar *data_dir)
+create_dialog (GeditSpellLanguageDialog *dialog)
 {
        GtkBuilder *builder;
        GtkWidget *content;
@@ -229,8 +228,7 @@ populate_language_list (GeditSpellLanguageDialog        *dialog,
 
 GtkWidget *
 gedit_spell_language_dialog_new (GtkWindow                       *parent,
-                                const GeditSpellCheckerLanguage *cur_lang,
-                                const gchar *data_dir)
+                                const GeditSpellCheckerLanguage *cur_lang)
 {
        GeditSpellLanguageDialog *dialog;
 
@@ -238,7 +236,7 @@ gedit_spell_language_dialog_new (GtkWindow                       *parent,
 
        dialog = g_object_new (GEDIT_TYPE_SPELL_LANGUAGE_DIALOG, NULL);
 
-       create_dialog (dialog, data_dir);
+       create_dialog (dialog);
 
        populate_language_list (dialog, cur_lang);
 
diff --git a/plugins/spell/gedit-spell-language-dialog.h b/plugins/spell/gedit-spell-language-dialog.h
index 63e284d..52d06f2 100644
--- a/plugins/spell/gedit-spell-language-dialog.h
+++ b/plugins/spell/gedit-spell-language-dialog.h
@@ -34,8 +34,7 @@ G_DECLARE_FINAL_TYPE (GeditSpellLanguageDialog,
                      GtkDialog)
 
 GtkWidget *    gedit_spell_language_dialog_new                 (GtkWindow                       *parent,
-                                                                const GeditSpellCheckerLanguage *cur_lang,
-                                                                const gchar                     *data_dir);
+                                                                const GeditSpellCheckerLanguage *cur_lang);
 
 const GeditSpellCheckerLanguage *
                gedit_spell_language_get_selected_language      (GeditSpellLanguageDialog *dialog);
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index c1a2f00..b921539 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -834,7 +834,6 @@ set_language_cb (GSimpleAction *action,
        const GeditSpellCheckerLanguage *lang;
        GtkWidget *dlg;
        GtkWindowGroup *wg;
-       gchar *data_dir;
 
        gedit_debug (DEBUG_PLUGINS);
 
@@ -848,11 +847,7 @@ set_language_cb (GSimpleAction *action,
 
        lang = gedit_spell_checker_get_language (checker);
 
-       data_dir = peas_extension_base_get_data_dir (PEAS_EXTENSION_BASE (plugin));
-       dlg = gedit_spell_language_dialog_new (GTK_WINDOW (priv->window),
-                                              lang,
-                                              data_dir);
-       g_free (data_dir);
+       dlg = gedit_spell_language_dialog_new (GTK_WINDOW (priv->window), lang);
 
        wg = gedit_window_get_group (priv->window);
 


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