[epiphany/wip/gtkaction-to-gaction] Simplify names of GAction callbacks
- From: Iulian Radu <iulianradu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/gtkaction-to-gaction] Simplify names of GAction callbacks
- Date: Fri, 1 Jul 2016 20:00:49 +0000 (UTC)
commit 6d57ee64560cdbc0f9b393e85008316316dcd715
Author: Iulian Radu <iulian radu67 gmail com>
Date: Fri Jul 1 21:58:29 2016 +0300
Simplify names of GAction callbacks
src/ephy-window.c | 54 +++++++++---------
src/window-commands.c | 153 ++++++++++++++++++++++++-------------------------
src/window-commands.h | 50 ++++++++--------
3 files changed, 128 insertions(+), 129 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 006866e..beef6ae 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -84,7 +84,7 @@ static const GtkActionEntry ephy_popups_entries [] = {
/* Document. */
{ "ContextBookmarkPage", NULL, N_("Add Boo_kmarkā¦"), "<control>D", NULL,
- G_CALLBACK (window_cmd_file_bookmark_page) },
+ G_CALLBACK (window_cmd_bookmark_page) },
/* Links. */
@@ -921,32 +921,32 @@ activate_toggle (GSimpleAction *action,
static const GActionEntry window_entries [] =
{
- { "new-tab", window_cmd_file_new_tab },
- { "open", window_cmd_file_open },
- { "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 },
- { "copy", window_cmd_edit_copy },
- { "paste", window_cmd_edit_paste },
- { "delete", window_cmd_edit_delete },
- { "zoom-in", window_cmd_view_zoom_in },
- { "zoom-out", window_cmd_view_zoom_out },
- { "zoom-normal", window_cmd_view_zoom_normal },
- { "print", window_cmd_file_print },
- { "find", window_cmd_edit_find },
- { "find-prev", window_cmd_edit_find_prev },
- { "find-next", window_cmd_edit_find_next },
+ { "new-tab", window_cmd_new_tab },
+ { "open", window_cmd_open },
+ { "save-as", window_cmd_save_as },
+ { "save-as-application", window_cmd_save_as_application },
+ { "undo", window_cmd_undo },
+ { "redo", window_cmd_redo },
+ { "cut", window_cmd_cut },
+ { "copy", window_cmd_copy },
+ { "paste", window_cmd_paste },
+ { "delete", window_cmd_delete },
+ { "zoom-in", window_cmd_zoom_in },
+ { "zoom-out", window_cmd_zoom_out },
+ { "zoom-normal", window_cmd_zoom_normal },
+ { "print", window_cmd_print },
+ { "find", window_cmd_find },
+ { "find-prev", window_cmd_find_prev },
+ { "find-next", window_cmd_find_next },
{ "open-bookmark", window_cmd_open_bookmark, "s" },
- { "bookmark-page", window_cmd_file_bookmark_page },
- { "encoding", window_cmd_view_encoding },
- { "page-source", window_cmd_view_page_source },
- { "toggle-inspector", window_cmd_view_toggle_inspector },
+ { "bookmark-page", window_cmd_bookmark_page },
+ { "encoding", window_cmd_encoding },
+ { "page-source", window_cmd_page_source },
+ { "toggle-inspector", window_cmd_toggle_inspector },
- { "select-all", window_cmd_edit_select_all },
+ { "select-all", window_cmd_select_all },
- { "send-to", window_cmd_file_send_to },
+ { "send-to", window_cmd_send_to },
{ "location", window_cmd_go_location },
/* Toggle actions */
@@ -970,9 +970,9 @@ static const GActionEntry toolbar_entries [] = {
{ "navigation-forward", window_cmd_navigation, "s" },
{ "navigation-forward-new-tab", window_cmd_navigation_new_tab, "s" },
- { "stop", window_cmd_view_stop },
- { "reload", window_cmd_view_reload },
- { "always-stop", window_cmd_view_stop },
+ { "stop", window_cmd_stop },
+ { "reload", window_cmd_reload },
+ { "always-stop", window_cmd_stop },
{ "combined-stop-reload", window_cmd_combined_stop_reload, NULL, "false",
ephy_toolbar_change_combined_stop_reload_state }
};
diff --git a/src/window-commands.c b/src/window-commands.c
index 58ab39f..0653455 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -347,9 +347,9 @@ window_cmd_navigation_new_tab (GSimpleAction *action,
}
void
-window_cmd_view_stop (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_stop (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = EPHY_WINDOW (user_data);
EphyEmbed *embed;
@@ -387,9 +387,9 @@ event_with_shift (void)
}
void
-window_cmd_view_reload (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_reload (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = EPHY_WINDOW (user_data);
EphyEmbed *embed;
@@ -431,9 +431,9 @@ void window_cmd_combined_stop_reload (GSimpleAction *action,
}
void
-window_cmd_file_new_tab (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_new_tab (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
@@ -466,9 +466,9 @@ open_response_cb (GtkDialog *dialog, int response, EphyWindow *window)
}
void
-window_cmd_file_open (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_open (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyFileChooser *dialog;
@@ -912,9 +912,9 @@ dialog_save_as_application_response_cb (GtkDialog *dialog,
}
void
-window_cmd_file_save_as_application (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_save_as_application (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyEmbed *embed;
@@ -1057,9 +1057,9 @@ save_response_cb (GtkDialog *dialog, int response, EphyEmbed *embed)
}
void
-window_cmd_file_save_as (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_save_as (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyEmbed *embed;
@@ -1088,9 +1088,9 @@ window_cmd_file_save_as (GSimpleAction *action,
}
void
-window_cmd_edit_undo (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_undo (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
GtkWidget *widget;
@@ -1112,9 +1112,9 @@ window_cmd_edit_undo (GSimpleAction *action,
}
void
-window_cmd_edit_redo (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_redo (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
GtkWidget *widget;
@@ -1134,9 +1134,9 @@ window_cmd_edit_redo (GSimpleAction *action,
}
}
void
-window_cmd_edit_cut (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_cut (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
@@ -1153,9 +1153,9 @@ window_cmd_edit_cut (GSimpleAction *action,
}
void
-window_cmd_edit_copy (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_copy (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
@@ -1173,9 +1173,9 @@ window_cmd_edit_copy (GSimpleAction *action,
}
void
-window_cmd_edit_paste (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_paste (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
@@ -1193,9 +1193,9 @@ window_cmd_edit_paste (GSimpleAction *action,
}
void
-window_cmd_edit_delete (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_delete (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window));
@@ -1217,9 +1217,9 @@ window_cmd_edit_delete (GSimpleAction *action,
}
void
-window_cmd_file_print (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_print (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyEmbed *embed;
@@ -1234,9 +1234,9 @@ window_cmd_file_print (GSimpleAction *action,
}
void
-window_cmd_edit_find (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_find (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyFindToolbar *toolbar;
@@ -1246,9 +1246,9 @@ window_cmd_edit_find (GSimpleAction *action,
}
void
-window_cmd_edit_find_prev (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_find_prev (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyFindToolbar *toolbar;
@@ -1258,9 +1258,9 @@ window_cmd_edit_find_prev (GSimpleAction *action,
}
void
-window_cmd_edit_find_next (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_find_next (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyFindToolbar *toolbar;
@@ -1284,9 +1284,9 @@ window_cmd_open_bookmark (GSimpleAction *action,
}
void
-window_cmd_file_bookmark_page (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_bookmark_page (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyEmbed *embed;
@@ -1300,9 +1300,9 @@ window_cmd_file_bookmark_page (GSimpleAction *action,
}
void
-window_cmd_view_zoom_in (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_zoom_in (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
@@ -1310,9 +1310,9 @@ window_cmd_view_zoom_in (GSimpleAction *action,
}
void
-window_cmd_view_zoom_out (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_zoom_out (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
@@ -1320,18 +1320,18 @@ window_cmd_view_zoom_out (GSimpleAction *action,
}
void
-window_cmd_view_zoom_normal (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_zoom_normal (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
ephy_window_set_zoom (window, 1.0);
}
void
-window_cmd_view_encoding (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_encoding (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyEncodingDialog *dialog;
@@ -1361,7 +1361,6 @@ view_source_embedded (const char *uri, EphyEmbed *embed)
gtk_widget_grab_focus (GTK_WIDGET (new_embed));
}
-
static void
save_temp_source_close_cb (GOutputStream *ostream, GAsyncResult *result, gpointer data)
{
@@ -1531,9 +1530,9 @@ save_temp_source (EphyEmbed *embed,
}
void
-window_cmd_view_page_source (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_page_source (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyEmbed *embed;
@@ -1571,9 +1570,9 @@ window_cmd_view_page_source (GSimpleAction *action,
}
void
-window_cmd_view_toggle_inspector (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_toggle_inspector (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
EphyEmbed *embed;
@@ -1597,9 +1596,9 @@ window_cmd_view_toggle_inspector (GSimpleAction *action,
}
void
-window_cmd_edit_select_all (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_select_all (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = user_data;
@@ -1619,9 +1618,9 @@ window_cmd_edit_select_all (GSimpleAction *action,
}
void
-window_cmd_file_send_to (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
+window_cmd_send_to (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
{
EphyWindow *window = EPHY_WINDOW (user_data);
EphyEmbed *embed;
@@ -1676,7 +1675,7 @@ window_cmd_load_location (GSimpleAction *action,
{
const char *location;
- location = ephy_window_get_location (window);
+ location = ephy_window_get_location (EPHY_WINDOW (user_data));
if (location) {
EphyBookmarks *bookmarks;
diff --git a/src/window-commands.h b/src/window-commands.h
index 64476a6..d36e77b 100644
--- a/src/window-commands.h
+++ b/src/window-commands.h
@@ -57,85 +57,85 @@ void window_cmd_navigation (GSimpleAction *action,
void window_cmd_navigation_new_tab (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_stop (GSimpleAction *action,
+void window_cmd_stop (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_reload (GSimpleAction *action,
+void window_cmd_reload (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void window_cmd_combined_stop_reload (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_file_new_tab (GSimpleAction *action,
+void window_cmd_new_tab (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_file_open (GSimpleAction *action,
+void window_cmd_open (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_file_save_as (GSimpleAction *action,
+void window_cmd_save_as (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_file_save_as_application (GSimpleAction *action,
+void window_cmd_save_as_application (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_undo (GSimpleAction *action,
+void window_cmd_undo (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_redo (GSimpleAction *action,
+void window_cmd_redo (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_cut (GSimpleAction *action,
+void window_cmd_cut (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_copy (GSimpleAction *action,
+void window_cmd_copy (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_paste (GSimpleAction *action,
+void window_cmd_paste (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_delete (GSimpleAction *action,
+void window_cmd_delete (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_file_print (GSimpleAction *action,
+void window_cmd_print (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_find (GSimpleAction *action,
+void window_cmd_find (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_find_prev (GSimpleAction *action,
+void window_cmd_find_prev (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_find_next (GSimpleAction *action,
+void window_cmd_find_next (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void window_cmd_open_bookmark (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_file_bookmark_page (GSimpleAction *action,
+void window_cmd_bookmark_page (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_zoom_in (GSimpleAction *action,
+void window_cmd_zoom_in (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_zoom_out (GSimpleAction *action,
+void window_cmd_zoom_out (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_zoom_normal (GSimpleAction *action,
+void window_cmd_zoom_normal (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_encoding (GSimpleAction *action,
+void window_cmd_encoding (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_page_source (GSimpleAction *action,
+void window_cmd_page_source (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_view_toggle_inspector (GSimpleAction *action,
+void window_cmd_toggle_inspector (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_edit_select_all (GSimpleAction *action,
+void window_cmd_select_all (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
-void window_cmd_file_send_to (GSimpleAction *action,
+void window_cmd_send_to (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void window_cmd_go_location (GSimpleAction *action,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]