[epiphany/wip/gtkaction-to-gaction: 47/54] Port Save As/Save As Application to GAction



commit 928fc3f3db61151b11aaea313e52eeb5195aaf95
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Sat May 14 20:30:49 2016 +0300

    Port Save As/Save As Application to GAction

 src/ephy-lockdown.c           |    7 +-
 src/ephy-window.c             |   52 +++++----
 src/resources/epiphany-ui.xml |    3 -
 src/resources/gtk/menus.ui    |   18 ++-
 src/window-commands.c         |  244 +++++++++++++++++++++--------------------
 src/window-commands.h         |   10 +-
 6 files changed, 174 insertions(+), 160 deletions(-)
---
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index a886240..0726083 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -102,7 +102,6 @@ static const BindAction window_actions[] = {
   { EPHY_PREFS_LOCKDOWN_BOOKMARK_EDITING, "FileBookmarkPage", "sensitive" },
 
   { EPHY_PREFS_LOCKDOWN_ARBITRARY_URL, "GoLocation", "sensitive" },
-  { EPHY_PREFS_LOCKDOWN_SAVE_TO_DISK, "FileSaveAs", "sensitive" },
 
   { EPHY_PREFS_LOCKDOWN_FULLSCREEN, "ViewFullscreen", "sensitive" },
   { EPHY_PREFS_LOCKDOWN_FULLSCREEN, "TabsDetach", "sensitive" },
@@ -111,6 +110,8 @@ static const BindAction window_actions[] = {
 };
 
 static const BindAction new_window_actions[] = {
+  { EPHY_PREFS_LOCKDOWN_SAVE_TO_DISK, "save-as", "enabled" },
+
   { EPHY_PREFS_LOCKDOWN_PRINTING, "print", "enabled" }
 };
 
@@ -167,7 +168,7 @@ new_sensitive_get_mapping (GValue   *value,
   after = g_action_get_enabled (action);
 
   /* Set (GAction::enabled) to the value in GSettings _only if_
-   * the LOCKDOWN_FLAG had some real effect in the GtkAction */
+   * the LOCKDOWN_FLAG had some real effect in the GAction */
   g_value_set_boolean (value, (before != after) ? after : before);
 
   return TRUE;
@@ -227,7 +228,7 @@ new_bind_settings_and_actions (GSettings        *settings,
                        G_SETTINGS_BIND_GET |
                        G_SETTINGS_BIND_INVERT_BOOLEAN);
     } else {
-      /* We need a custom get_mapping for 'sensitive'
+      /* We need a custom get_mapping for 'enabled'
        * properties, see usage of
        * ephy_action_change_sensitivity_flags in
        * ephy-window.c. */
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 38121d1..0090993 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -92,10 +92,6 @@ static const GtkActionEntry ephy_menu_entries [] = {
     G_CALLBACK (window_cmd_file_new_incognito_window) },
   { "FileOpen", NULL, N_("_Open…"), "<control>O", NULL,
     G_CALLBACK (window_cmd_file_open) },
-  { "FileSaveAs", NULL, N_("Save _As…"), "<shift><control>S", NULL,
-    G_CALLBACK (window_cmd_file_save_as) },
-  { "FileSaveAsApplication", NULL, N_("Save As _Web Application…"), "<shift><control>A", NULL,
-    G_CALLBACK (window_cmd_file_save_as_application) },
   { "FileSendTo", NULL, N_("S_end Link by Email…"), NULL, NULL,
     G_CALLBACK (window_cmd_file_send_to) },
   { "FileCloseTab", NULL, N_("_Close"), "<control>W", NULL,
@@ -244,7 +240,6 @@ static const struct {
   /* FIXME: these are not in any menu for now, so add them here. */
   { GDK_KEY_F11, 0, "ViewFullscreen", FALSE },
 
-  { GDK_KEY_s, GDK_CONTROL_MASK, "FileSaveAs", FALSE },
   { GDK_KEY_r, GDK_CONTROL_MASK, "ViewReload", FALSE },
   { GDK_KEY_R, GDK_CONTROL_MASK, "ViewReload", FALSE },
   { GDK_KEY_R, GDK_CONTROL_MASK |
@@ -312,6 +307,8 @@ const struct {
   const gchar *action_and_target;
   const gchar *accelerators[5];
 } accels [] = {
+  { "win.save-as", { "<shift><Primary>S", "<Primary>s", NULL } },
+  { "win.save-as-application", { "<shift><Primary>A", NULL } },
   { "win.undo", { "<Primary>Z", NULL } },
   { "win.redo", { "<shift><Primary>Z", NULL } },
   { "win.copy", { "<Primary>C", NULL } },
@@ -1063,10 +1060,6 @@ setup_ui_manager (EphyWindow *window)
 
   action = gtk_action_group_get_action (action_group, "FileOpen");
   g_object_set (action, "short_label", _("Open"), NULL);
-  action = gtk_action_group_get_action (action_group, "FileSaveAs");
-  g_object_set (action, "short_label", _("Save As"), NULL);
-  action = gtk_action_group_get_action (action_group, "FileSaveAsApplication");
-  g_object_set (action, "short_label", _("Save As Application"), NULL);
   action = gtk_action_group_get_action (action_group, "FileBookmarkPage");
   g_object_set (action, "short_label", _("Bookmark"), NULL);
 
@@ -1171,11 +1164,12 @@ _ephy_window_set_default_actions_sensitive (EphyWindow *window,
   GtkAction *action;
   GAction *new_action;
   int i;
-  const char *action_group_actions[] = { "FileSaveAs", "FileSaveAsApplication", "FileSendTo",
-                                         "FileBookmarkPage", "ViewEncoding", "ViewPageSource",
+  const char *action_group_actions[] = { "FileSendTo", "FileBookmarkPage",
+                                         "ViewEncoding", "ViewPageSource",
                                          NULL };
 
-  const char *new_action_group_actions[] = { "zoom-in", "zoom-out", "print",
+  const char *new_action_group_actions[] = { "save-as", "save-as-application",
+                                         "zoom-in", "zoom-out", "print",
                                          "find", "find-prev", "find-next",
                                          NULL };
 
@@ -3095,8 +3089,6 @@ setup_location_controller (EphyWindow  *window,
 static const char *disabled_actions_for_app_mode[] = { "FileOpen",
                                                        "FileNewWindow",
                                                        "FileNewWindowIncognito",
-                                                       "FileSaveAs",
-                                                       "FileSaveAsApplication",
                                                        "ViewEncoding",
                                                        "ViewPageSource",
                                                        "ViewToggleInspector",
@@ -3105,6 +3097,9 @@ static const char *disabled_actions_for_app_mode[] = { "FileOpen",
                                                        "EditHistory",
                                                        "EditPreferences" };
 
+static const char *new_disabled_actions_for_app_mode[] = { "save-as",
+                                                       "save-as-application" };
+
 static void
 parse_css_error (GtkCssProvider *provider,
                  GtkCssSection  *section,
@@ -3153,9 +3148,8 @@ ephy_window_toggle_visibility_for_app_menu (EphyWindow *window)
 static const GActionEntry new_ephy_page_menu_entries [] =
 {
   // { "new-tab", },
-  // { "open", },
-  // { "save-as", }
-  // { "save-as-application", }
+  { "save-as", window_cmd_file_save_as },
+  { "save-as-application", window_cmd_file_save_as_application },
   { "undo", window_cmd_edit_undo },
   { "redo", window_cmd_edit_redo },
   { "cut", window_cmd_edit_cut },
@@ -3170,12 +3164,12 @@ static const GActionEntry new_ephy_page_menu_entries [] =
   { "print", window_cmd_file_print },
   { "find", window_cmd_edit_find },
   { "find-prev", window_cmd_edit_find_prev },
-  { "find-next", window_cmd_edit_find_next }
-  // { "bookmarks", },
-  // { "bookmark-page", },
-  // { "view-encoding", },
-  // { "view-page-source", },
-  // { "close-tab", }
+  { "find-next", window_cmd_edit_find_next },
+  { "bookmarks", },
+  { "bookmark-page", },
+  { "view-encoding", },
+  { "view-page-source", },
+  { "close-tab", }
 };
 
 static GObject *
@@ -3187,6 +3181,7 @@ ephy_window_constructor (GType                  type,
   EphyWindow *window;
   GtkSettings *settings;
   GtkAction *action;
+  GAction *new_action;
   GtkActionGroup *toolbar_action_group;
   GError *error = NULL;
   guint settings_connection;
@@ -3207,10 +3202,11 @@ ephy_window_constructor (GType                  type,
                                    window);
 
   app = g_application_get_default ();
-  for (i = 0; i < G_N_ELEMENTS (accels); i++)
+  for (i = 0; i < G_N_ELEMENTS (accels); i++) {
     gtk_application_set_accels_for_action (GTK_APPLICATION (app),
                                            accels[i].action_and_target,
                                            accels[i].accelerators);
+  }
 
   ephy_gui_ensure_window_group (GTK_WINDOW (window));
 
@@ -3310,11 +3306,19 @@ ephy_window_constructor (GType                  type,
     gtk_action_set_visible (action, FALSE);
 
     for (i = 0; i < G_N_ELEMENTS (disabled_actions_for_app_mode); i++) {
+      printf("Disabled\n");
       action = gtk_action_group_get_action (window->action_group,
                                             disabled_actions_for_app_mode[i]);
       ephy_action_change_sensitivity_flags (action, SENS_FLAG_CHROME, TRUE);
       gtk_action_set_visible (action, FALSE);
     }
+
+    for (i = 0; i < G_N_ELEMENTS (new_disabled_actions_for_app_mode); i++) {
+      new_action = g_action_map_lookup_action (G_ACTION_MAP (window),
+                                       new_disabled_actions_for_app_mode[i]);
+      new_ephy_action_change_sensitivity_flags (G_SIMPLE_ACTION (new_action),
+                                            SENS_FLAG_CHROME, TRUE);
+    }
     chrome &= ~(EPHY_WINDOW_CHROME_MENU | EPHY_WINDOW_CHROME_TABSBAR);
   }
 
diff --git a/src/resources/epiphany-ui.xml b/src/resources/epiphany-ui.xml
index ea02b19..d62d7a1 100644
--- a/src/resources/epiphany-ui.xml
+++ b/src/resources/epiphany-ui.xml
@@ -14,9 +14,6 @@
                 <menuitem name="FileNewWindowIncognitoMenu" action="FileNewWindowIncognito"/>
                 <menuitem name="FileNewTabMenu" action="FileNewTab"/>
                 <menuitem name="FileOpenMenu" action="FileOpen"/>
-                <separator name="FileSep1"/>   
-                <menuitem name="FileSaveAsMenu" action="FileSaveAs"/>
-                <menuitem name="FileSaveAsApplicationMenu" action="FileSaveAsApplication"/>
                 <separator name="FileSep2"/>
                 <menuitem name="EditPreferencesMenu" action="EditPreferences"/>
                 <separator name="FileSep4"/>
diff --git a/src/resources/gtk/menus.ui b/src/resources/gtk/menus.ui
index c9e315b..bbbc983 100644
--- a/src/resources/gtk/menus.ui
+++ b/src/resources/gtk/menus.ui
@@ -11,14 +11,20 @@
         <attribute name="label" translatable="yes">_Open…</attribute>
         <attribute name="action">win.open</attribute>
       </item>
+    </section> -->
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">Save _As…</attribute>
+        <attribute name="action">win.save-as</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Save As _Web Application…</attribute>
+        <attribute name="action">win.save-as-application</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
+      </item>
     </section>
     <section>
-      <attribute name="label" translatable="yes">Save _As…</attribute>
-      <attribute name="action">win.save-as</attribute>
-      <attribute name="label" translatable="yes">Save As _Web Application…</attribute>
-      <attribute name="action">win.save-as-application</attribute>
-    </section> -->
-    <section id="undo-redo">
       <item>
         <attribute name="label" translatable="yes">_Undo</attribute>
         <attribute name="action">win.undo</attribute>
diff --git a/src/window-commands.c b/src/window-commands.c
index a6ea295..db77ffc 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -251,62 +251,102 @@ window_cmd_file_open (GtkAction  *action,
   gtk_widget_show (GTK_WIDGET (dialog));
 }
 
-static char *
-get_suggested_filename (EphyEmbed *embed)
+void
+window_cmd_file_close_window (GtkAction  *action,
+                              EphyWindow *window)
 {
-  EphyWebView *view;
-  char *suggested_filename = NULL;
-  const char *mimetype;
-  WebKitURIResponse *response;
-  WebKitWebResource *web_resource;
+  GtkWidget *notebook;
+  EphyEmbed *embed;
 
-  view = ephy_embed_get_web_view (embed);
-  web_resource = webkit_web_view_get_main_resource (WEBKIT_WEB_VIEW (view));
-  response = webkit_web_resource_get_response (web_resource);
-  mimetype = webkit_uri_response_get_mime_type (response);
+  notebook = ephy_window_get_notebook (window);
 
-  if ((g_ascii_strncasecmp (mimetype, "text/html", 9)) == 0) {
-    /* Web Title will be used as suggested filename */
-    suggested_filename = g_strconcat (ephy_embed_get_title (embed), ".mhtml", NULL);
-  } else {
-    suggested_filename = g_strdup (webkit_uri_response_get_suggested_filename (response));
-    if (!suggested_filename) {
-      SoupURI *soup_uri = soup_uri_new (webkit_web_resource_get_uri (web_resource));
-      suggested_filename = g_path_get_basename (soup_uri->path);
-      soup_uri_free (soup_uri);
-    }
+  if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
+                              EPHY_PREFS_LOCKDOWN_QUIT) &&
+      gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) == 1) {
+    return;
   }
 
-  return suggested_filename;
+  embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
+  g_return_if_fail (embed != NULL);
+
+  g_signal_emit_by_name (notebook, "tab-close-request", embed);
 }
 
 void
-window_cmd_file_save_as (GtkAction  *action,
-                         EphyWindow *window)
+window_cmd_file_quit (GtkAction  *action,
+                      EphyWindow *window)
+{
+  if (ephy_shell_close_all_windows (ephy_shell_get_default ()))
+    g_application_quit (g_application_get_default ());
+}
+
+void
+window_cmd_file_new_window (GtkAction  *action,
+                            EphyWindow *window)
 {
   EphyEmbed *embed;
-  EphyFileChooser *dialog;
-  char *suggested_filename;
+  EphyWindow *new_window = ephy_window_new ();
 
-  embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
-  g_return_if_fail (embed != NULL);
+  embed = ephy_shell_new_tab (ephy_shell_get_default (),
+                              new_window, NULL, 0);
+  ephy_web_view_load_homepage (ephy_embed_get_web_view (embed));
+  ephy_window_activate_location (new_window);
+}
 
-  dialog = ephy_file_chooser_new (_("Save"),
-                                  GTK_WIDGET (window),
-                                  GTK_FILE_CHOOSER_ACTION_SAVE,
-                                  EPHY_FILE_FILTER_NONE);
+void
+window_cmd_file_new_incognito_window (GtkAction  *action,
+                                      EphyWindow *window)
+{
+  ephy_open_incognito_window (NULL);
+}
 
-  gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
+void
+window_cmd_edit_bookmarks (GtkAction  *action,
+                           EphyWindow *window)
+{
+  GtkWidget *bwindow;
 
-  suggested_filename = ephy_sanitize_filename (get_suggested_filename (embed));
+  bwindow = ephy_shell_get_bookmarks_editor (ephy_shell_get_default ());
+  gtk_window_present (GTK_WINDOW (bwindow));
+}
 
-  gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), suggested_filename);
-  g_free (suggested_filename);
+void
+window_cmd_edit_history (GtkAction  *action,
+                         EphyWindow *window)
+{
+  GtkWidget *hwindow;
 
-  g_signal_connect (dialog, "response",
-                    G_CALLBACK (save_response_cb), embed);
+  hwindow = ephy_shell_get_history_window (ephy_shell_get_default ());
 
-  gtk_widget_show (GTK_WIDGET (dialog));
+  if (GTK_WINDOW (window) != gtk_window_get_transient_for (GTK_WINDOW (hwindow)))
+    gtk_window_set_transient_for (GTK_WINDOW (hwindow),
+                                  GTK_WINDOW (window));
+  gtk_window_present (GTK_WINDOW (hwindow));
+}
+
+void
+window_cmd_edit_preferences (GtkAction  *action,
+                             EphyWindow *window)
+{
+  GtkWindow *dialog;
+
+  dialog = GTK_WINDOW (ephy_shell_get_prefs_dialog (ephy_shell_get_default ()));
+
+  if (GTK_WINDOW (window) != gtk_window_get_transient_for (dialog))
+    gtk_window_set_transient_for (dialog,
+                                  GTK_WINDOW (window));
+
+  gtk_window_present (dialog);
+}
+
+void
+window_cmd_view_fullscreen (GtkAction  *action,
+                            EphyWindow *window)
+{
+  if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
+    gtk_window_fullscreen (GTK_WINDOW (window));
+  else
+    gtk_window_unfullscreen (GTK_WINDOW (window));
 }
 
 typedef struct {
@@ -737,9 +777,11 @@ dialog_save_as_application_response_cb (GtkDialog                 *dialog,
 }
 
 void
-window_cmd_file_save_as_application (GtkAction  *action,
-                                     EphyWindow *window)
+window_cmd_file_save_as_application (GSimpleAction *action,
+                                     GVariant      *value,
+                                     gpointer       user_data)
 {
+  EphyWindow *window = user_data;
   EphyEmbed *embed;
   GtkWidget *dialog, *box, *image, *entry, *content_area;
   GtkWidget *label;
@@ -827,102 +869,64 @@ window_cmd_file_save_as_application (GtkAction  *action,
   gtk_widget_show_all (dialog);
 }
 
-void
-window_cmd_file_close_window (GtkAction  *action,
-                              EphyWindow *window)
+static char *
+get_suggested_filename (EphyEmbed *embed)
 {
-  GtkWidget *notebook;
-  EphyEmbed *embed;
+  EphyWebView *view;
+  char *suggested_filename = NULL;
+  const char *mimetype;
+  WebKitURIResponse *response;
+  WebKitWebResource *web_resource;
 
-  notebook = ephy_window_get_notebook (window);
+  view = ephy_embed_get_web_view (embed);
+  web_resource = webkit_web_view_get_main_resource (WEBKIT_WEB_VIEW (view));
+  response = webkit_web_resource_get_response (web_resource);
+  mimetype = webkit_uri_response_get_mime_type (response);
 
-  if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
-                              EPHY_PREFS_LOCKDOWN_QUIT) &&
-      gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) == 1) {
-    return;
+  if ((g_ascii_strncasecmp (mimetype, "text/html", 9)) == 0) {
+    /* Web Title will be used as suggested filename */
+    suggested_filename = g_strconcat (ephy_embed_get_title (embed), ".mhtml", NULL);
+  } else {
+    suggested_filename = g_strdup (webkit_uri_response_get_suggested_filename (response));
+    if (!suggested_filename) {
+      SoupURI *soup_uri = soup_uri_new (webkit_web_resource_get_uri (web_resource));
+      suggested_filename = g_path_get_basename (soup_uri->path);
+      soup_uri_free (soup_uri);
+    }
   }
 
-  embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
-  g_return_if_fail (embed != NULL);
-
-  g_signal_emit_by_name (notebook, "tab-close-request", embed);
-}
-
-void
-window_cmd_file_quit (GtkAction  *action,
-                      EphyWindow *window)
-{
-  if (ephy_shell_close_all_windows (ephy_shell_get_default ()))
-    g_application_quit (g_application_get_default ());
+  return suggested_filename;
 }
 
 void
-window_cmd_file_new_window (GtkAction  *action,
-                            EphyWindow *window)
+window_cmd_file_save_as (GSimpleAction *action,
+                         GVariant      *value,
+                         gpointer       user_data)
 {
+  EphyWindow *window = user_data;
   EphyEmbed *embed;
-  EphyWindow *new_window = ephy_window_new ();
-
-  embed = ephy_shell_new_tab (ephy_shell_get_default (),
-                              new_window, NULL, 0);
-  ephy_web_view_load_homepage (ephy_embed_get_web_view (embed));
-  ephy_window_activate_location (new_window);
-}
-
-void
-window_cmd_file_new_incognito_window (GtkAction  *action,
-                                      EphyWindow *window)
-{
-  ephy_open_incognito_window (NULL);
-}
-
-void
-window_cmd_edit_bookmarks (GtkAction  *action,
-                           EphyWindow *window)
-{
-  GtkWidget *bwindow;
-
-  bwindow = ephy_shell_get_bookmarks_editor (ephy_shell_get_default ());
-  gtk_window_present (GTK_WINDOW (bwindow));
-}
-
-void
-window_cmd_edit_history (GtkAction  *action,
-                         EphyWindow *window)
-{
-  GtkWidget *hwindow;
+  EphyFileChooser *dialog;
+  char *suggested_filename;
 
-  hwindow = ephy_shell_get_history_window (ephy_shell_get_default ());
+  embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
+  g_return_if_fail (embed != NULL);
 
-  if (GTK_WINDOW (window) != gtk_window_get_transient_for (GTK_WINDOW (hwindow)))
-    gtk_window_set_transient_for (GTK_WINDOW (hwindow),
-                                  GTK_WINDOW (window));
-  gtk_window_present (GTK_WINDOW (hwindow));
-}
+  dialog = ephy_file_chooser_new (_("Save"),
+                                  GTK_WIDGET (window),
+                                  GTK_FILE_CHOOSER_ACTION_SAVE,
+                                  EPHY_FILE_FILTER_NONE);
 
-void
-window_cmd_edit_preferences (GtkAction  *action,
-                             EphyWindow *window)
-{
-  GtkWindow *dialog;
+  gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
 
-  dialog = GTK_WINDOW (ephy_shell_get_prefs_dialog (ephy_shell_get_default ()));
+  suggested_filename = ephy_sanitize_filename (get_suggested_filename (embed));
 
-  if (GTK_WINDOW (window) != gtk_window_get_transient_for (dialog))
-    gtk_window_set_transient_for (dialog,
-                                  GTK_WINDOW (window));
+  gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), suggested_filename);
+  g_free (suggested_filename);
 
-  gtk_window_present (dialog);
-}
+  g_signal_connect (dialog, "response",
+                    G_CALLBACK (save_response_cb), embed);
 
-void
-window_cmd_view_fullscreen (GtkAction  *action,
-                            EphyWindow *window)
-{
-  if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
-    gtk_window_fullscreen (GTK_WINDOW (window));
-  else
-    gtk_window_unfullscreen (GTK_WINDOW (window));
+  gtk_widget_show (GTK_WIDGET (dialog));
 }
 
 void
diff --git a/src/window-commands.h b/src/window-commands.h
index a0816b7..bcd2cf7 100644
--- a/src/window-commands.h
+++ b/src/window-commands.h
@@ -34,10 +34,6 @@ void window_cmd_file_bookmark_page        (GtkAction  *action,
                                            EphyWindow *window);
 void window_cmd_file_open                 (GtkAction  *action,
                                            EphyWindow *window);
-void window_cmd_file_save_as              (GtkAction  *action,
-                                           EphyWindow *window);
-void window_cmd_file_save_as_application  (GtkAction  *action,
-                                           EphyWindow *window);
 void window_cmd_undo_close_tab            (GtkAction *action,
                                            EphyWindow *window);
 void window_cmd_file_send_to              (GtkAction  *action,
@@ -48,6 +44,12 @@ void window_cmd_view_encoding             (GtkAction  *action,
                                            EphyWindow *window);
 void window_cmd_view_fullscreen           (GtkAction  *action,
                                            EphyWindow *window);
+void window_cmd_file_save_as              (GSimpleAction *action,
+                                           GVariant      *value,
+                                           gpointer       user_data);
+void window_cmd_file_save_as_application  (GSimpleAction *action,
+                                           GVariant      *value,
+                                           gpointer       user_data);
 void window_cmd_edit_undo                 (GSimpleAction *action,
                                            GVariant      *value,
                                            gpointer       user_data);


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