[gtranslator: 1/2] Remove useless GtkAction arguments
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 1/2] Remove useless GtkAction arguments
- Date: Mon, 7 Mar 2022 08:11:59 +0000 (UTC)
commit b142cf1b6e2ef7e835e52d686ee3731696b1550e
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Sun Mar 6 21:52:59 2022 +0100
Remove useless GtkAction arguments
They are not used and GtkAction is deprecated in GTK 3.10.
src/gtr-actions-documents.c | 5 ++-
src/gtr-actions-edit.c | 18 +++++------
src/gtr-actions-file.c | 14 ++++-----
src/gtr-actions-go.c | 24 +++++++--------
src/gtr-actions-view.c | 2 +-
src/gtr-actions.h | 75 ++++++++++++++++++++-------------------------
src/gtr-application.c | 28 ++++++++---------
src/gtr-dl-teams.c | 2 +-
src/gtr-projects.c | 2 +-
9 files changed, 79 insertions(+), 91 deletions(-)
---
diff --git a/src/gtr-actions-documents.c b/src/gtr-actions-documents.c
index e9d2371d..e8b397f3 100644
--- a/src/gtr-actions-documents.c
+++ b/src/gtr-actions-documents.c
@@ -22,7 +22,7 @@
#include "gtr-actions.h"
void
-gtr_actions_documents_next_document (GtkAction * action, GtrWindow * window)
+gtr_actions_documents_next_document (GtrWindow * window)
{
GtrNotebook *notebook;
notebook = gtr_window_get_notebook (window);
@@ -30,8 +30,7 @@ gtr_actions_documents_next_document (GtkAction * action, GtrWindow * window)
}
void
-gtr_actions_documents_previous_document (GtkAction * action,
- GtrWindow * window)
+gtr_actions_documents_previous_document (GtrWindow * window)
{
GtrNotebook *notebook;
notebook = gtr_window_get_notebook (window);
diff --git a/src/gtr-actions-edit.c b/src/gtr-actions-edit.c
index c58aa209..0b56749e 100644
--- a/src/gtr-actions-edit.c
+++ b/src/gtr-actions-edit.c
@@ -33,7 +33,7 @@
#include "gtr-window.h"
void
-gtr_actions_edit_undo (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_undo (GtrWindow * window)
{
GtrView *active_view;
GtkSourceBuffer *active_document;
@@ -60,7 +60,7 @@ gtr_actions_edit_undo (GtkAction * action, GtrWindow * window)
}
void
-gtr_actions_edit_redo (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_redo (GtrWindow * window)
{
GtrView *active_view;
GtkSourceBuffer *active_document;
@@ -87,7 +87,7 @@ gtr_actions_edit_redo (GtkAction * action, GtrWindow * window)
}
void
-gtr_actions_edit_cut (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_cut (GtrWindow * window)
{
GtrView *active_view;
@@ -100,7 +100,7 @@ gtr_actions_edit_cut (GtkAction * action, GtrWindow * window)
}
void
-gtr_actions_edit_copy (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_copy (GtrWindow * window)
{
GtrView *active_view;
@@ -113,7 +113,7 @@ gtr_actions_edit_copy (GtkAction * action, GtrWindow * window)
}
void
-gtr_actions_edit_paste (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_paste (GtrWindow * window)
{
GtrView *active_view;
@@ -130,7 +130,7 @@ gtr_actions_edit_paste (GtkAction * action, GtrWindow * window)
* Use the untranslated message as the translation.
*/
void
-gtr_message_copy_to_translation (GtkAction * action, GtrWindow * window)
+gtr_message_copy_to_translation (GtrWindow * window)
{
GtrTab *current;
@@ -143,7 +143,7 @@ gtr_message_copy_to_translation (GtkAction * action, GtrWindow * window)
* Toggle the sticky status
*/
void
-gtr_message_status_toggle_fuzzy (GtkAction * action, GtrWindow * window)
+gtr_message_status_toggle_fuzzy (GtrWindow * window)
{
GtrTab *current;
GtrPo *po;
@@ -165,13 +165,13 @@ gtr_message_status_toggle_fuzzy (GtkAction * action, GtrWindow * window)
}
void
-gtr_actions_edit_header (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_header (GtrWindow * window)
{
gtr_show_header_dialog (window);
}
void
-gtr_actions_edit_clear (GtkAction * action, GtrWindow * window)
+gtr_actions_edit_clear (GtrWindow * window)
{
GtrTab *tab;
diff --git a/src/gtr-actions-file.c b/src/gtr-actions-file.c
index 0d3f86f5..da381213 100644
--- a/src/gtr-actions-file.c
+++ b/src/gtr-actions-file.c
@@ -247,7 +247,7 @@ gtr_want_to_save_current_dialog (GtrWindow * window)
* The "Open file" dialog.
*/
void
-gtr_open_file_dialog (GtkAction * action, GtrWindow * window)
+gtr_open_file_dialog (GtrWindow * window)
{
GtkWidget *dialog = NULL;
g_autoptr (GList) list = NULL;
@@ -514,7 +514,7 @@ gtr_upload_file (GtkWidget *upload_dialog,
*
*/
void
-gtr_upload_file_dialog (GtkAction * action, GtrWindow * window)
+gtr_upload_file_dialog (GtrWindow * window)
{
GtrUploadDialog *dialog = gtr_upload_dialog_new (GTK_WIDGET (window));
@@ -530,7 +530,7 @@ gtr_upload_file_dialog (GtkAction * action, GtrWindow * window)
* "Save as" dialog.
*/
void
-gtr_save_file_as_dialog (GtkAction * action, GtrWindow * window)
+gtr_save_file_as_dialog (GtrWindow * window)
{
GtkWidget *dialog;
GtrTab *current_page;
@@ -855,7 +855,7 @@ gtr_close_tab (GtrTab * tab, GtrWindow * window)
}
void
-gtr_file_close (GtkAction * widget, GtrWindow * window)
+gtr_file_close (GtrWindow * window)
{
GtrTab *tab;
@@ -926,7 +926,7 @@ close_all_documents (GtrWindow * window, gboolean logout_mode)
}
void
-gtr_file_quit (GtkAction * action, GtrWindow * window)
+gtr_file_quit (GtrWindow * window)
{
g_object_set_data (G_OBJECT (window),
GTR_IS_CLOSING_ALL, GINT_TO_POINTER (1));
@@ -935,13 +935,13 @@ gtr_file_quit (GtkAction * action, GtrWindow * window)
}
void
-_gtr_actions_file_close_all (GtkAction * action, GtrWindow * window)
+_gtr_actions_file_close_all (GtrWindow * window)
{
close_all_documents (window, FALSE);
}
void
-_gtr_actions_file_save_all (GtkAction * action, GtrWindow * window)
+_gtr_actions_file_save_all (GtrWindow * window)
{
GList *list, *l;
diff --git a/src/gtr-actions-go.c b/src/gtr-actions-go.c
index e6a95dc5..4f17e370 100644
--- a/src/gtr-actions-go.c
+++ b/src/gtr-actions-go.c
@@ -31,7 +31,7 @@
void
-gtr_message_go_to_first (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_first (GtrWindow * window)
{
GtrTab *current;
@@ -40,7 +40,7 @@ gtr_message_go_to_first (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_previous (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_previous (GtrWindow * window)
{
GtrTab *current;
@@ -49,7 +49,7 @@ gtr_message_go_to_previous (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_next (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_next (GtrWindow * window)
{
GtrTab *current;
@@ -58,7 +58,7 @@ gtr_message_go_to_next (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_last (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_last (GtrWindow * window)
{
GtrTab *current;
@@ -67,7 +67,7 @@ gtr_message_go_to_last (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_next_fuzzy (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_next_fuzzy (GtrWindow * window)
{
GtrTab *current;
@@ -76,7 +76,7 @@ gtr_message_go_to_next_fuzzy (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_prev_fuzzy (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_prev_fuzzy (GtrWindow * window)
{
GtrTab *current;
@@ -85,7 +85,7 @@ gtr_message_go_to_prev_fuzzy (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_next_untranslated (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_next_untranslated (GtrWindow * window)
{
GtrTab *current;
@@ -94,7 +94,7 @@ gtr_message_go_to_next_untranslated (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_prev_untranslated (GtkAction * action, GtrWindow * window)
+gtr_message_go_to_prev_untranslated (GtrWindow * window)
{
GtrTab *current;
@@ -103,8 +103,7 @@ gtr_message_go_to_prev_untranslated (GtkAction * action, GtrWindow * window)
}
void
-gtr_message_go_to_next_fuzzy_or_untranslated (GtkAction * action,
- GtrWindow * window)
+gtr_message_go_to_next_fuzzy_or_untranslated (GtrWindow * window)
{
GtrTab *current;
@@ -113,8 +112,7 @@ gtr_message_go_to_next_fuzzy_or_untranslated (GtkAction * action,
}
void
-gtr_message_go_to_prev_fuzzy_or_untranslated (GtkAction * action,
- GtrWindow * window)
+gtr_message_go_to_prev_fuzzy_or_untranslated (GtrWindow * window)
{
GtrTab *current;
@@ -123,7 +121,7 @@ gtr_message_go_to_prev_fuzzy_or_untranslated (GtkAction * action,
}
void
-gtr_message_jump (GtkAction * action, GtrWindow * window)
+gtr_message_jump (GtrWindow * window)
{
gtr_show_jump_dialog (window);
}
diff --git a/src/gtr-actions-view.c b/src/gtr-actions-view.c
index a1bfcd5e..da410627 100644
--- a/src/gtr-actions-view.c
+++ b/src/gtr-actions-view.c
@@ -18,7 +18,7 @@
#include "gtr-actions.h"
void
-gtr_actions_view_context (GtkAction * action, GtrWindow * window)
+gtr_actions_view_context (GtrWindow * window)
{
GtrTab *tab;
GtkWidget *context;
diff --git a/src/gtr-actions.h b/src/gtr-actions.h
index 6af2a9f2..209d4b83 100644
--- a/src/gtr-actions.h
+++ b/src/gtr-actions.h
@@ -46,85 +46,78 @@ struct _LastSearchData
gboolean gtr_want_to_save_current_dialog (GtrWindow * window);
-void gtr_open_file_dialog (GtkAction * action, GtrWindow * window);
+void gtr_open_file_dialog (GtrWindow * window);
void gtr_save_current_file_dialog (GtkWidget * widget, GtrWindow * window);
-void gtr_save_file_as_dialog (GtkAction * action, GtrWindow * window);
+void gtr_save_file_as_dialog (GtrWindow * window);
-void gtr_upload_file_dialog (GtkAction * action, GtrWindow * window);
+void gtr_upload_file_dialog (GtrWindow * window);
gboolean gtr_open (GFile * location, GtrWindow * window, GError ** error);
void gtr_close_tab (GtrTab * tab, GtrWindow * window);
-void gtr_file_close (GtkAction * widget, GtrWindow * window);
+void gtr_file_close (GtrWindow * window);
-void gtr_file_quit (GtkAction * action, GtrWindow * window);
+void gtr_file_quit (GtrWindow * window);
void gtr_actions_load_locations (GtrWindow * window,
const GSList * locations);
-void _gtr_actions_file_close_all (GtkAction * action, GtrWindow * window);
+void _gtr_actions_file_close_all (GtrWindow * window);
-void _gtr_actions_file_save_all (GtkAction * action, GtrWindow * window);
+void _gtr_actions_file_save_all (GtrWindow * window);
/*Edit*/
-void gtr_actions_edit_undo (GtkAction * action, GtrWindow * window);
+void gtr_actions_edit_undo (GtrWindow * window);
-void gtr_actions_edit_redo (GtkAction * action, GtrWindow * window);
+void gtr_actions_edit_redo (GtrWindow * window);
-void gtr_actions_edit_cut (GtkAction * action, GtrWindow * window);
+void gtr_actions_edit_cut (GtrWindow * window);
-void gtr_actions_edit_copy (GtkAction * action, GtrWindow * window);
+void gtr_actions_edit_copy (GtrWindow * window);
-void gtr_actions_edit_paste (GtkAction * action, GtrWindow * window);
+void gtr_actions_edit_paste (GtrWindow * window);
-void gtr_actions_edit_header (GtkAction * action, GtrWindow * window);
+void gtr_actions_edit_header (GtrWindow * window);
-void gtr_message_copy_to_translation (GtkAction * action, GtrWindow * window);
+void gtr_message_copy_to_translation (GtrWindow * window);
-void gtr_message_status_toggle_fuzzy (GtkAction * action, GtrWindow * window);
+void gtr_message_status_toggle_fuzzy (GtrWindow * window);
-void gtr_actions_edit_clear (GtkAction * action, GtrWindow * window);
+void gtr_actions_edit_clear (GtrWindow * window);
/* View */
-void gtr_actions_view_context (GtkAction * action, GtrWindow * window);
+void gtr_actions_view_context (GtrWindow * window);
/*Go*/
-void gtr_message_go_to_first (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_first (GtrWindow * window);
-void gtr_message_go_to_previous (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_previous (GtrWindow * window);
-void gtr_message_go_to_next (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_next (GtrWindow * window);
-void gtr_message_go_to_last (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_last (GtrWindow * window);
-void gtr_message_go_to_next_fuzzy (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_next_fuzzy (GtrWindow * window);
-void gtr_message_go_to_prev_fuzzy (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_prev_fuzzy (GtrWindow * window);
-void gtr_message_go_to_next_untranslated
- (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_next_untranslated (GtrWindow * window);
-void gtr_message_go_to_prev_untranslated
- (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_prev_untranslated (GtrWindow * window);
-void gtr_message_go_to_next_fuzzy_or_untranslated
- (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_next_fuzzy_or_untranslated (GtrWindow * window);
-void gtr_message_go_to_prev_fuzzy_or_untranslated
- (GtkAction * action, GtrWindow * window);
+void gtr_message_go_to_prev_fuzzy_or_untranslated (GtrWindow * window);
-void gtr_message_jump (GtkAction * action,
- GtrWindow * window);
+void gtr_message_jump (GtrWindow * window);
/*Search*/
-void _gtr_actions_search_find (GtkAction * action,
- GtrWindow * window);
+void _gtr_actions_search_find (GtrWindow * window);
-void _gtr_actions_search_replace (GtkAction * action,
- GtrWindow * window);
+void _gtr_actions_search_replace (GtrWindow * window);
void gtr_page_stop_search (GtrTab * tab,
GtrSearchBar * search_bar);
@@ -169,14 +162,12 @@ void search_bar_response_cb (GtrSearchBar * dialog,
GtrWindow * window);
/*Documents*/
-void gtr_actions_documents_next_document
- (GtkAction * action, GtrWindow * window);
+void gtr_actions_documents_next_document (GtrWindow * window);
-void gtr_actions_documents_previous_document
- (GtkAction * action, GtrWindow * window);
+void gtr_actions_documents_previous_document (GtrWindow * window);
/*Help*/
-void gtr_window_show_home_page (GtkAction * action, gpointer useless);
+void gtr_window_show_home_page (gpointer useless);
G_END_DECLS
#endif
diff --git a/src/gtr-application.c b/src/gtr-application.c
index 6f49440d..db58041b 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -125,7 +125,7 @@ static gboolean
on_window_delete_event_cb (GtrWindow * window,
GdkEvent * event, GtrApplication * app)
{
- gtr_file_quit (NULL, window);
+ gtr_file_quit (window);
return TRUE;
}
@@ -309,7 +309,7 @@ copy_text_activated (GSimpleAction *action,
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_message_copy_to_translation (NULL, priv->active_window);
+ gtr_message_copy_to_translation (priv->active_window);
}
static void
@@ -329,7 +329,7 @@ edit_header_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_actions_edit_header (NULL, priv->active_window);
+ gtr_actions_edit_header (priv->active_window);
}
static void
@@ -399,7 +399,7 @@ quit_activated (GSimpleAction *action,
for (l = windows; l != NULL; l = g_list_next (l))
{
- gtr_file_quit (NULL, l->data);
+ gtr_file_quit (l->data);
}
}
@@ -410,7 +410,7 @@ upload_file_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_upload_file_dialog (NULL, priv->active_window);
+ gtr_upload_file_dialog (priv->active_window);
}
static void
@@ -420,7 +420,7 @@ saveas_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_save_file_as_dialog (NULL, priv->active_window);
+ gtr_save_file_as_dialog (priv->active_window);
}
static void
@@ -440,7 +440,7 @@ open_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_open_file_dialog (NULL, priv->active_window);
+ gtr_open_file_dialog (priv->active_window);
}
static void
@@ -470,7 +470,7 @@ undo_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_actions_edit_undo (NULL, priv->active_window);
+ gtr_actions_edit_undo (priv->active_window);
}
static void
@@ -480,7 +480,7 @@ redo_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_actions_edit_redo (NULL, priv->active_window);
+ gtr_actions_edit_redo (priv->active_window);
}
static void
@@ -490,7 +490,7 @@ prev_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_message_go_to_previous (NULL, priv->active_window);
+ gtr_message_go_to_previous (priv->active_window);
}
static void
@@ -500,7 +500,7 @@ next_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_message_go_to_next (NULL, priv->active_window);
+ gtr_message_go_to_next (priv->active_window);
}
static void
@@ -510,7 +510,7 @@ prev_no_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_message_go_to_prev_fuzzy_or_untranslated (NULL, priv->active_window);
+ gtr_message_go_to_prev_fuzzy_or_untranslated (priv->active_window);
}
static void
@@ -520,7 +520,7 @@ next_no_activated (GSimpleAction *action,
{
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
- gtr_message_go_to_next_fuzzy_or_untranslated (NULL, priv->active_window);
+ gtr_message_go_to_next_fuzzy_or_untranslated (priv->active_window);
}
static void
@@ -553,7 +553,7 @@ toggle_fuzzy_activated (GSimpleAction *action,
GtrApplication *app = GTR_APPLICATION (user_data);
GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
GtrWindow *w = GTR_WINDOW (priv->active_window);
- gtr_message_status_toggle_fuzzy (NULL, w);
+ gtr_message_status_toggle_fuzzy (w);
}
static void
diff --git a/src/gtr-dl-teams.c b/src/gtr-dl-teams.c
index 8dc6f55b..60d07925 100644
--- a/src/gtr-dl-teams.c
+++ b/src/gtr-dl-teams.c
@@ -891,7 +891,7 @@ team_add_cb (GtkButton *btn,
{
GtrDlTeamsPrivate *priv = gtr_dl_teams_get_instance_private (self);
GtrWindow *window = GTR_WINDOW (priv->main_window);
- gtr_open_file_dialog (NULL, window);
+ gtr_open_file_dialog (window);
}
diff --git a/src/gtr-projects.c b/src/gtr-projects.c
index d04b3446..996c1934 100644
--- a/src/gtr-projects.c
+++ b/src/gtr-projects.c
@@ -120,7 +120,7 @@ project_add_cb (GtkButton *btn,
{
GtrProjectsPrivate *priv = gtr_projects_get_instance_private (self);
GtrWindow *window = GTR_WINDOW (priv->main_window);
- gtr_open_file_dialog (NULL, window);
+ gtr_open_file_dialog (window);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]