gtranslator r3644 - in trunk: . data src



Author: icq
Date: Mon Sep 22 09:40:44 2008
New Revision: 3644
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3644&view=rev

Log:
Squashed commit of the following:

commit 5340ce244e79c7fdcfcd1037d08974faec098dcd
Author: Ignacio Casal Quinteiro <nacho resa gmail com>
Date:   Fri Aug 1 15:06:39 2008 +0200

    2008-08-01  Ignacio Casal Quinteiro  <nacho resa gmail com>

            * data/gtranslator-ui.xml:
            Removed useless menuitems.

    	* src:
            * actions-edit.c (gtranslator_actions_edit_clear):
            * actions.h:
            * tab.c (gtranslator_tab_clear_msgstr_views):
            * tab.h:
            * window.c:
            Removed useless menuitems and implemented clear menuitem.

Modified:
   trunk/ChangeLog
   trunk/data/gtranslator-ui.xml
   trunk/src/ChangeLog
   trunk/src/actions-edit.c
   trunk/src/actions.h
   trunk/src/tab.c
   trunk/src/tab.h
   trunk/src/window.c

Modified: trunk/data/gtranslator-ui.xml
==============================================================================
--- trunk/data/gtranslator-ui.xml	(original)
+++ trunk/data/gtranslator-ui.xml	Mon Sep 22 09:40:44 2008
@@ -64,8 +64,6 @@
       <menuitem name="GoForwardMenu" action="GoForward"/>
       <menuitem name="GoLastMenu" action="GoLast"/>
       <separator/>
-      <menuitem name="GoJumpToMenu" action="GoJumpTo"/>
-      <separator/>
       <menuitem name="GoNextFuzzyMenu" action="GoNextFuzzy"/>
       <menuitem name="GoPreviousFuzzyMenu" action="GoPreviousFuzzy"/>
       <separator/>
@@ -75,9 +73,9 @@
 
     <menu name="SearchMenu" action="Search">
       <menuitem name="SearchFindMenu" action="SearchFind"/>
-      <menuitem name="SearchFindNextMenu" action="SearchFindNext"/>
+    <?--  <menuitem name="SearchFindNextMenu" action="SearchFindNext"/>
       <menuitem name="SearchFindPreviousMenu" action="SearchFindPrevious"/>
-      <separator/>
+      <separator/>--?>
       <menuitem name="SearchReplaceMenu" action="SearchReplace"/>
     </menu>
 

Modified: trunk/src/actions-edit.c
==============================================================================
--- trunk/src/actions-edit.c	(original)
+++ trunk/src/actions-edit.c	Mon Sep 22 09:40:44 2008
@@ -207,3 +207,16 @@
 {	
 	gtranslator_show_comment_dialog(window);
 }
+
+void
+gtranslator_actions_edit_clear (GtkAction *action,
+				GtranslatorWindow *window)
+{
+	GtranslatorTab *tab;
+	
+	g_return_if_fail (GTR_IS_WINDOW (window));
+	
+	tab = gtranslator_window_get_active_tab (window);
+	
+	gtranslator_tab_clear_msgstr_views (tab);
+}

Modified: trunk/src/actions.h
==============================================================================
--- trunk/src/actions.h	(original)
+++ trunk/src/actions.h	Mon Sep 22 09:40:44 2008
@@ -80,6 +80,9 @@
 void       gtranslator_actions_edit_preferences (GtkAction *action,
 						 GtranslatorWindow *window);
 
+void       gtranslator_actions_edit_clear       (GtkAction *action,
+						 GtranslatorWindow *window);
+
 /* View */
 
 /*Go*/

Modified: trunk/src/tab.c
==============================================================================
--- trunk/src/tab.c	(original)
+++ trunk/src/tab.c	Mon Sep 22 09:40:44 2008
@@ -1190,3 +1190,23 @@
 	gtk_notebook_remove_page (GTK_NOTEBOOK (tab->priv->lateral_panel),
 				  page);
 }
+
+void
+gtranslator_tab_clear_msgstr_views (GtranslatorTab *tab)
+{
+	gint i = 0;
+	GtranslatorHeader *header;
+	GtkTextBuffer *buf;
+	
+	g_return_if_fail (GTR_IS_TAB (tab));
+	
+	header = gtranslator_po_get_header (tab->priv->po);
+	
+	do {
+		buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (tab->priv->trans_msgstr[i]));
+		gtk_text_buffer_begin_user_action (buf);
+		gtk_text_buffer_set_text (buf, "", -1);
+		gtk_text_buffer_end_user_action (buf);
+		i++;
+	}while (i < gtranslator_header_get_nplurals (header));
+}

Modified: trunk/src/tab.h
==============================================================================
--- trunk/src/tab.h	(original)
+++ trunk/src/tab.h	Mon Sep 22 09:40:44 2008
@@ -122,6 +122,8 @@
 
 void                   gtranslator_tab_remove_widget_from_lateral_panel (GtranslatorTab *tab,
 									 GtkWidget *widget);
+
+void                   gtranslator_tab_clear_msgstr_views  (GtranslatorTab *tab);
 							    
 gboolean              _gtranslator_tab_can_close           (GtranslatorTab *tab);
 

Modified: trunk/src/window.c
==============================================================================
--- trunk/src/window.c	(original)
+++ trunk/src/window.c	Mon Sep 22 09:40:44 2008
@@ -165,8 +165,8 @@
 	  N_("Paste the contents of the clipboard"),
 	  G_CALLBACK (gtranslator_actions_edit_paste) },
 	{ "EditClear", GTK_STOCK_CLEAR, NULL, NULL,
-	  N_("Clear the selected translation"), NULL},
-	//  G_CALLBACK (gtranslator_selection_clear) },
+	  N_("Clear the selected translation"),
+	  G_CALLBACK (gtranslator_actions_edit_clear) },
 	{ "EditHeader", GTK_STOCK_PROPERTIES, N_("_Header..."), NULL, NULL,
 	  G_CALLBACK (gtranslator_actions_edit_header) },
 	{ "EditComment", GTK_STOCK_INDEX, N_("C_omment..."), NULL,
@@ -218,9 +218,6 @@
 	{ "GoLast", GTK_STOCK_GOTO_LAST, NULL, NULL,
           N_("Go to the last message"),
           G_CALLBACK (gtranslator_message_go_to_last) },
-	{ "GoJumpTo", GTK_STOCK_JUMP_TO, NULL, NULL,
-          N_("Go to specified message number"), NULL},
-          //G_CALLBACK (gtranslator_go_to_dialog) },
 	{ "GoNextFuzzy", GTK_STOCK_GO_FORWARD, N_("Next Fuz_zy"),
 	  "<control>Page_Down", N_("Go to the next fuzzy message"),
           G_CALLBACK (gtranslator_message_go_to_next_fuzzy) },
@@ -238,12 +235,12 @@
 	{ "SearchFind", GTK_STOCK_FIND, NULL, "<control>F",
 	  N_("Search for text"),
 	  G_CALLBACK(_gtranslator_actions_search_find) },
-	{ "SearchFindNext", NULL, N_("Find Ne_xt"), NULL,
+	/*{ "SearchFindNext", NULL, N_("Find Ne_xt"), NULL,
 	  N_("Search forward for the same text"), NULL},
 	 // G_CALLBACK (gtranslator_find) },
 	{ "SearchFindPrevious", NULL, N_("Find _Previous"), NULL,
 	  N_("Search backward for the same text"), NULL},
-	 // G_CALLBACK (gtranslator_find) },
+	 // G_CALLBACK (gtranslator_find) },*/
 	{ "SearchReplace", GTK_STOCK_FIND_AND_REPLACE, NULL, "<control>H",
 	  N_("Search for and replace text"),
 	  G_CALLBACK (_gtranslator_actions_search_replace) },



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