[gedit/wip/fix-external-tools] commands-file: make some functions static
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/fix-external-tools] commands-file: make some functions static
- Date: Fri, 7 Nov 2014 15:24:21 +0000 (UTC)
commit a0f60cfac4ca711840597c33b69dfc73dc9b3e07
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Nov 7 16:20:41 2014 +0100
commands-file: make some functions static
_gedit_cmd_file_save_tab() and _gedit_cmd_file_save_as_tab() were used
only in gedit-commands-file.c, so make them static (and rename them).
gedit/gedit-commands-file.c | 33 ++++++++++++++++++---------------
gedit/gedit-commands.h | 4 ----
2 files changed, 18 insertions(+), 19 deletions(-)
---
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index 902bc1f..60eada0 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -53,6 +53,9 @@ static void tab_state_changed_while_saving (GeditTab *tab,
GParamSpec *pspec,
GeditWindow *window);
+static void save_as_tab (GeditTab *tab,
+ GeditWindow *window);
+
void
_gedit_cmd_file_new (GSimpleAction *action,
GVariant *parameter,
@@ -829,7 +832,7 @@ save_next_tab:
}
gedit_window_set_active_tab (window, tab);
- _gedit_cmd_file_save_as_tab (tab, window);
+ save_as_tab (tab, window);
}
}
@@ -870,9 +873,9 @@ confirm_overwrite_callback (GeditFileChooserDialog *dialog,
return res;
}
-void
-_gedit_cmd_file_save_as_tab (GeditTab *tab,
- GeditWindow *window)
+static void
+save_as_tab (GeditTab *tab,
+ GeditWindow *window)
{
GeditFileChooserDialog *save_dialog;
GtkWindowGroup *wg;
@@ -976,9 +979,9 @@ _gedit_cmd_file_save_as_tab (GeditTab *tab,
gedit_file_chooser_dialog_show (save_dialog);
}
-void
-_gedit_cmd_file_save_tab (GeditTab *tab,
- GeditWindow *window)
+static void
+save_tab (GeditTab *tab,
+ GeditWindow *window)
{
GeditDocument *doc;
gchar *uri_for_display;
@@ -996,7 +999,7 @@ _gedit_cmd_file_save_tab (GeditTab *tab,
{
gedit_debug_message (DEBUG_COMMANDS, "Untitled or Readonly");
- _gedit_cmd_file_save_as_tab (tab, window);
+ save_as_tab (tab, window);
return;
}
@@ -1029,7 +1032,7 @@ _gedit_cmd_file_save (GSimpleAction *action,
if (tab == NULL)
return;
- _gedit_cmd_file_save_tab (tab, window);
+ save_tab (tab, window);
}
void
@@ -1046,7 +1049,7 @@ _gedit_cmd_file_save_as (GSimpleAction *action,
if (tab == NULL)
return;
- _gedit_cmd_file_save_as_tab (tab, window);
+ save_as_tab (tab, window);
}
/*
@@ -1097,7 +1100,7 @@ _gedit_cmd_file_save_documents_list (GeditWindow *window,
}
else
{
- _gedit_cmd_file_save_tab (t, window);
+ save_tab (t, window);
}
}
}
@@ -1153,7 +1156,7 @@ _gedit_cmd_file_save_documents_list (GeditWindow *window,
tab = GEDIT_TAB (tabs_to_save_as->data);
gedit_window_set_active_tab (window, tab);
- _gedit_cmd_file_save_as_tab (tab, window);
+ save_as_tab (tab, window);
}
}
@@ -1193,7 +1196,7 @@ gedit_commands_save_document (GeditWindow *window,
gedit_debug (DEBUG_COMMANDS);
tab = gedit_tab_get_from_document (document);
- _gedit_cmd_file_save_tab (tab, window);
+ save_tab (tab, window);
}
/* File revert */
@@ -1513,7 +1516,7 @@ save_and_close (GeditTab *tab,
G_CALLBACK (tab_state_changed_while_saving),
window);
- _gedit_cmd_file_save_tab (tab, window);
+ save_tab (tab, window);
}
static void
@@ -1533,7 +1536,7 @@ save_as_and_close (GeditTab *tab,
window);
gedit_window_set_active_tab (window, tab);
- _gedit_cmd_file_save_as_tab (tab, window);
+ save_as_tab (tab, window);
}
static void
diff --git a/gedit/gedit-commands.h b/gedit/gedit-commands.h
index 66d12b2..2ecfcec 100644
--- a/gedit/gedit-commands.h
+++ b/gedit/gedit-commands.h
@@ -66,10 +66,6 @@ void _gedit_cmd_file_new (GSimpleAction *action,
void _gedit_cmd_file_open (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void _gedit_cmd_file_save_tab (GeditTab *tab,
- GeditWindow *window);
-void _gedit_cmd_file_save_as_tab (GeditTab *tab,
- GeditWindow *window);
void _gedit_cmd_file_reopen_closed_tab (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]