[gedit/wip/spell-checking: 1/2] spell-language-dialog: remove unused data_dir parameter



commit a707afbb8de014916dac49e9faeb87b2b94e45e4
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 05aa7c6..f4480c0 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -831,7 +831,6 @@ set_language_cb (GSimpleAction *action,
        const GeditSpellCheckerLanguage *lang;
        GtkWidget *dlg;
        GtkWindowGroup *wg;
-       gchar *data_dir;
 
        gedit_debug (DEBUG_PLUGINS);
 
@@ -845,11 +844,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]