[gedit] spell-checker-dialog: remove data_dir function arguments
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] spell-checker-dialog: remove data_dir function arguments
- Date: Fri, 24 Jul 2015 17:08:32 +0000 (UTC)
commit 5557bb94a286042cc31c1b6745ecacff3e824fcc
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Jul 24 16:08:24 2015 +0200
spell-checker-dialog: remove data_dir function arguments
Those were probably used to load the .ui file, but the .ui file is now
loaded from a GResource.
plugins/spell/gedit-spell-checker-dialog.c | 12 +++++-------
plugins/spell/gedit-spell-checker-dialog.h | 5 ++---
plugins/spell/gedit-spell-plugin.c | 5 +----
3 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-checker-dialog.c b/plugins/spell/gedit-spell-checker-dialog.c
index 2685dd8..a17c818 100644
--- a/plugins/spell/gedit-spell-checker-dialog.c
+++ b/plugins/spell/gedit-spell-checker-dialog.c
@@ -201,8 +201,7 @@ gedit_spell_checker_dialog_class_init (GeditSpellCheckerDialogClass * klass)
}
static void
-create_dialog (GeditSpellCheckerDialog *dlg,
- const gchar *data_dir)
+create_dialog (GeditSpellCheckerDialog *dlg)
{
GtkBuilder *builder;
GtkWidget *content;
@@ -313,7 +312,7 @@ gedit_spell_checker_dialog_init (GeditSpellCheckerDialog *dlg)
}
GtkWidget *
-gedit_spell_checker_dialog_new (const gchar *data_dir)
+gedit_spell_checker_dialog_new (void)
{
GeditSpellCheckerDialog *dlg;
@@ -322,14 +321,13 @@ gedit_spell_checker_dialog_new (const gchar *data_dir)
g_return_val_if_fail (dlg != NULL, NULL);
- create_dialog (dlg, data_dir);
+ create_dialog (dlg);
return GTK_WIDGET (dlg);
}
GtkWidget *
-gedit_spell_checker_dialog_new_from_spell_checker (GeditSpellChecker *spell,
- const gchar *data_dir)
+gedit_spell_checker_dialog_new_from_spell_checker (GeditSpellChecker *spell)
{
GeditSpellCheckerDialog *dlg;
@@ -340,7 +338,7 @@ gedit_spell_checker_dialog_new_from_spell_checker (GeditSpellChecker *spell,
g_return_val_if_fail (dlg != NULL, NULL);
- create_dialog (dlg, data_dir);
+ create_dialog (dlg);
gedit_spell_checker_dialog_set_spell_checker (dlg, spell);
diff --git a/plugins/spell/gedit-spell-checker-dialog.h b/plugins/spell/gedit-spell-checker-dialog.h
index eb49dc5..e0be6ec 100644
--- a/plugins/spell/gedit-spell-checker-dialog.h
+++ b/plugins/spell/gedit-spell-checker-dialog.h
@@ -64,10 +64,9 @@ struct _GeditSpellCheckerDialogClass
GType gedit_spell_checker_dialog_get_type (void) G_GNUC_CONST;
-GtkWidget * gedit_spell_checker_dialog_new (const gchar *data_dir);
+GtkWidget * gedit_spell_checker_dialog_new (void);
-GtkWidget * gedit_spell_checker_dialog_new_from_spell_checker (GeditSpellChecker *spell,
- const gchar *data_dir);
+GtkWidget * gedit_spell_checker_dialog_new_from_spell_checker (GeditSpellChecker *spell);
void gedit_spell_checker_dialog_set_spell_checker (GeditSpellCheckerDialog *dlg,
GeditSpellChecker *spell);
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index e81c395..cf11651 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -893,7 +893,6 @@ spell_cb (GSimpleAction *action,
GtkTextIter start, end;
gint word_start_offset, word_end_offset;
gchar *word;
- gchar *data_dir;
gedit_debug (DEBUG_PLUGINS);
@@ -945,9 +944,7 @@ spell_cb (GSimpleAction *action,
return;
}
- data_dir = peas_extension_base_get_data_dir (PEAS_EXTENSION_BASE (plugin));
- dlg = gedit_spell_checker_dialog_new_from_spell_checker (checker, data_dir);
- g_free (data_dir);
+ dlg = gedit_spell_checker_dialog_new_from_spell_checker (checker);
gtk_window_set_modal (GTK_WINDOW (dlg), TRUE);
gtk_window_set_transient_for (GTK_WINDOW (dlg),
GTK_WINDOW (priv->window));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]