1 /*
2  * Copyright (C) 2007  Ignacio Casal Quinteiro <nacho.resa@gmail.com>
3  *
4  *     This program is free software: you can redistribute it and/or modify
5  *     it under the terms of the GNU General Public License as published by
6  *     the Free Software Foundation, either version 3 of the License, or
7  *     (at your option) any later version.
8  *
9  *     This program is distributed in the hope that it will be useful,
10  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *     GNU General Public License for more details.
13  *
14  *     You should have received a copy of the GNU General Public License
15  *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  *
17  */
18 
19 #ifdef HAVE_CONFIG_H
20 #include <config.h>
21 #endif
22 
23 #include <gtk/gtk.h>
24 #include <glib.h>
25 #include <glib/gi18n.h>
26 
27 #include "gtr-actions.h"
28 #include "gtr-jump-dialog.h"
29 #include "gtr-tab.h"
30 #include "gtr-window.h"
31 
32 
33 void
gtr_message_go_to_first(GtkAction * action,GtrWindow * window)34 gtr_message_go_to_first (GtkAction * action, GtrWindow * window)
35 {
36   GtrTab *current;
37 
38   current = gtr_window_get_active_tab (window);
39   gtr_tab_go_to_first (current);
40 }
41 
42 void
gtr_message_go_to_previous(GtkAction * action,GtrWindow * window)43 gtr_message_go_to_previous (GtkAction * action, GtrWindow * window)
44 {
45   GtrTab *current;
46 
47   current = gtr_window_get_active_tab (window);
48   gtr_tab_go_to_prev (current);
49 }
50 
51 void
gtr_message_go_to_next(GtkAction * action,GtrWindow * window)52 gtr_message_go_to_next (GtkAction * action, GtrWindow * window)
53 {
54   GtrTab *current;
55 
56   current = gtr_window_get_active_tab (window);
57   gtr_tab_go_to_next (current);
58 }
59 
60 void
gtr_message_go_to_last(GtkAction * action,GtrWindow * window)61 gtr_message_go_to_last (GtkAction * action, GtrWindow * window)
62 {
63   GtrTab *current;
64 
65   current = gtr_window_get_active_tab (window);
66   gtr_tab_go_to_last (current);
67 }
68 
69 void
gtr_message_go_to_next_fuzzy(GtkAction * action,GtrWindow * window)70 gtr_message_go_to_next_fuzzy (GtkAction * action, GtrWindow * window)
71 {
72   GtrTab *current;
73 
74   current = gtr_window_get_active_tab (window);
75   gtr_tab_go_to_next_fuzzy (current);
76 }
77 
78 void
gtr_message_go_to_prev_fuzzy(GtkAction * action,GtrWindow * window)79 gtr_message_go_to_prev_fuzzy (GtkAction * action, GtrWindow * window)
80 {
81   GtrTab *current;
82 
83   current = gtr_window_get_active_tab (window);
84   gtr_tab_go_to_prev_fuzzy (current);
85 }
86 
87 void
gtr_message_go_to_next_untranslated(GtkAction * action,GtrWindow * window)88 gtr_message_go_to_next_untranslated (GtkAction * action, GtrWindow * window)
89 {
90   GtrTab *current;
91 
92   current = gtr_window_get_active_tab (window);
93   gtr_tab_go_to_next_untrans (current);
94 }
95 
96 void
gtr_message_go_to_prev_untranslated(GtkAction * action,GtrWindow * window)97 gtr_message_go_to_prev_untranslated (GtkAction * action, GtrWindow * window)
98 {
99   GtrTab *current;
100 
101   current = gtr_window_get_active_tab (window);
102   gtr_tab_go_to_prev_untrans (current);
103 }
104 
105 void
gtr_message_go_to_next_fuzzy_or_untranslated(GtkAction * action,GtrWindow * window)106 gtr_message_go_to_next_fuzzy_or_untranslated (GtkAction * action,
107                                               GtrWindow * window)
108 {
109   GtrTab *current;
110 
111   current = gtr_window_get_active_tab (window);
112   gtr_tab_go_to_next_fuzzy_or_untrans (current);
113 }
114 
115 void
gtr_message_go_to_prev_fuzzy_or_untranslated(GtkAction * action,GtrWindow * window)116 gtr_message_go_to_prev_fuzzy_or_untranslated (GtkAction * action,
117                                               GtrWindow * window)
118 {
119   GtrTab *current;
120 
121   current = gtr_window_get_active_tab (window);
122   gtr_tab_go_to_prev_fuzzy_or_untrans (current);
123 }
124 
125 void
gtr_message_jump(GtkAction * action,GtrWindow * window)126 gtr_message_jump (GtkAction * action, GtrWindow * window)
127 {
128   gtr_show_jump_dialog (window);
129 }
130