gtranslator r3469 - in branches/GOBJECT_WORK: . doc/reference plugins/alternate-language plugins/open-tran src



Author: icq
Date: Thu Jan 31 17:01:37 2008
New Revision: 3469
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3469&view=rev

Log:
2008-01-31  Ignacio Casal Quinteiro  <nacho resa gmail com>

        * plugins/alternate-language/alternate-language-plugin.c
        * plugins/open-tran/open-tran.gtranslator-plugin.desktop.in
        * src/panel.c
        * src/panel.h
        * src/tab.c
        * src/tab.h
        * src/Makefile.am
        * doc/reference/gtranslator.types
        * doc/reference/gtranslator-docs.sgml
        Switched to GtkNotebook instead of GtranslatorPanel.



Removed:
   branches/GOBJECT_WORK/src/panel.c
   branches/GOBJECT_WORK/src/panel.h
Modified:
   branches/GOBJECT_WORK/ChangeLog
   branches/GOBJECT_WORK/doc/reference/gtranslator-docs.sgml
   branches/GOBJECT_WORK/doc/reference/gtranslator.types
   branches/GOBJECT_WORK/plugins/alternate-language/alternate-language-plugin.c
   branches/GOBJECT_WORK/plugins/open-tran/open-tran.gtranslator-plugin.desktop.in
   branches/GOBJECT_WORK/src/Makefile.am
   branches/GOBJECT_WORK/src/tab.c
   branches/GOBJECT_WORK/src/tab.h

Modified: branches/GOBJECT_WORK/doc/reference/gtranslator-docs.sgml
==============================================================================
--- branches/GOBJECT_WORK/doc/reference/gtranslator-docs.sgml	(original)
+++ branches/GOBJECT_WORK/doc/reference/gtranslator-docs.sgml	Thu Jan 31 17:01:37 2008
@@ -21,7 +21,6 @@
     <xi:include href="xml/msg.xml"/>
     <xi:include href="xml/notebook.xml"/>
     <xi:include href="xml/plugin.xml"/>
-    <xi:include href="xml/panel.xml"/>
     <xi:include href="xml/po.xml"/>
     <xi:include href="xml/statusbar.xml"/>
     <xi:include href="xml/tab.xml"/>

Modified: branches/GOBJECT_WORK/doc/reference/gtranslator.types
==============================================================================
--- branches/GOBJECT_WORK/doc/reference/gtranslator.types	(original)
+++ branches/GOBJECT_WORK/doc/reference/gtranslator.types	Thu Jan 31 17:01:37 2008
@@ -9,7 +9,6 @@
 #include "msg.h"
 #include "notebook.h"
 #include "plugin.h"
-#include "panel.h"
 #include "po.h"
 #include "statusbar.h"
 #include "tab.h"

Modified: branches/GOBJECT_WORK/plugins/alternate-language/alternate-language-plugin.c
==============================================================================
--- branches/GOBJECT_WORK/plugins/alternate-language/alternate-language-plugin.c	(original)
+++ branches/GOBJECT_WORK/plugins/alternate-language/alternate-language-plugin.c	Thu Jan 31 17:01:37 2008
@@ -59,29 +59,28 @@
 			     GtranslatorWindow *window)
 {
 	GtkWidget *alternatelang;
-	GtkWidget *image;
 	GtranslatorPo *po;
-	GtranslatorPanel *panel;
+	GtkWidget *panel;
+	GtkWidget *label;
 	
-	po = gtranslator_tab_get_po(GTR_TAB(child));
+	po = gtranslator_tab_get_po (GTR_TAB (child));
 	
-	g_return_if_fail(po != NULL);
+	g_return_if_fail (po != NULL);
 	
-	alternatelang = gtranslator_alternate_lang_panel_new(child);
+	alternatelang = gtranslator_alternate_lang_panel_new (child);
+	gtk_widget_show (alternatelang);
 	
-	panel = gtranslator_tab_get_panel(GTR_TAB(child));
+	panel = gtranslator_tab_get_panel (GTR_TAB(child));
 	
-	image = gtk_image_new_from_stock(GTK_STOCK_INDEX,
-					 GTK_ICON_SIZE_SMALL_TOOLBAR);
+	label = gtk_label_new (_("Alternate Language"));
 	
-	gtranslator_panel_add_item(panel,
-				   alternatelang,
-				   _("Alternate Language"),
-				   image);
+	gtk_notebook_append_page (GTK_NOTEBOOK (panel),
+				  alternatelang,
+				  label);
 
-	g_object_set_data(G_OBJECT(child),
-			  WINDOW_DATA_KEY,
-			  alternatelang);
+	g_object_set_data (G_OBJECT (child),
+			   WINDOW_DATA_KEY,
+			   alternatelang);
 }
 
 static void
@@ -113,10 +112,11 @@
 impl_deactivate(GtranslatorPlugin *plugin,
 	        GtranslatorWindow *window)
 {
-	GtranslatorPanel *panel;
+	GtkWidget *panel;
 	GtranslatorNotebook *notebook;
 	GtkWidget *alternatelang;
 	GList *tabs;
+	gint page_num;
 	
 	tabs = gtranslator_window_get_all_tabs(window);
 	notebook = gtranslator_window_get_notebook(window);
@@ -126,7 +126,11 @@
 	do{
 		alternatelang = g_object_get_data(G_OBJECT(tabs->data), WINDOW_DATA_KEY);
 		panel = gtranslator_tab_get_panel (GTR_TAB(tabs->data));
-		gtranslator_panel_remove_item (panel, alternatelang);
+		
+		page_num = gtk_notebook_page_num (GTK_NOTEBOOK (panel),
+						  alternatelang);
+		gtk_notebook_remove_page (GTK_NOTEBOOK (panel),
+					  page_num);
 
 		g_object_set_data (G_OBJECT (tabs->data), WINDOW_DATA_KEY, NULL);
 		

Modified: branches/GOBJECT_WORK/plugins/open-tran/open-tran.gtranslator-plugin.desktop.in
==============================================================================
--- branches/GOBJECT_WORK/plugins/open-tran/open-tran.gtranslator-plugin.desktop.in	(original)
+++ branches/GOBJECT_WORK/plugins/open-tran/open-tran.gtranslator-plugin.desktop.in	Thu Jan 31 17:01:37 2008
@@ -2,7 +2,7 @@
 Module=opentran
 IAge=2
 _Name=Open Tran
-_Description=Look for word in Open tran memory translation data base.
+_Description=Look for phrases in Open tran memory translation database.
 Authors=Ignacio Casal Quinteiro <nacho resa gmail com>
 Copyright=Copyright @ 2008 Ignacio Casal Quinteiro
 Website=http://gtranslator.sf.net

Modified: branches/GOBJECT_WORK/src/Makefile.am
==============================================================================
--- branches/GOBJECT_WORK/src/Makefile.am	(original)
+++ branches/GOBJECT_WORK/src/Makefile.am	Thu Jan 31 17:01:37 2008
@@ -56,7 +56,6 @@
 	message-table.h \
 	msg.h \
 	notebook.h \
-	panel.h \
 	po.h \
 	statusbar.h \
 	tab.h \
@@ -76,7 +75,6 @@
 	message-area.c \
 	message-table.c \
 	notebook.c \
-	panel.c \
 	tab.c \
 	view.c \
 	window.c \

Modified: branches/GOBJECT_WORK/src/tab.c
==============================================================================
--- branches/GOBJECT_WORK/src/tab.c	(original)
+++ branches/GOBJECT_WORK/src/tab.c	Thu Jan 31 17:01:37 2008
@@ -58,7 +58,7 @@
 	
 	GtkWidget *table_pane;
 	GtkWidget *content_pane;
-	GtranslatorPanel *panel;
+	GtkWidget *panel;
 	GtkWidget *message_table;
 
 	GtkWidget *comment_pane;
@@ -423,6 +423,7 @@
 	GtkWidget *vertical_box;
 	GtkTextBuffer *buf;
 	gchar *label;
+	GtkWidget *label_widget;
 	gint i = 0;
 	
 	GtranslatorTabPrivate *priv = tab->priv;
@@ -430,20 +431,20 @@
 	/*
 	 * Panel
 	 */
-	priv->panel = GTR_PANEL(gtranslator_panel_new(GTK_ORIENTATION_HORIZONTAL));
+	priv->panel = gtk_notebook_new ();
+	gtk_notebook_set_tab_pos (GTK_NOTEBOOK (priv->panel),
+				  GTK_POS_BOTTOM);
 
 	/*
 	 * Message table
 	 */
 	priv->message_table = gtranslator_message_table_new(GTK_WIDGET(tab));
 
-	image = gtk_image_new_from_stock(GTK_STOCK_INDEX,
-					 GTK_ICON_SIZE_SMALL_TOOLBAR);
-
-	gtranslator_panel_add_item(priv->panel,
-				   priv->message_table,
-				   _("Message Table"),
-				   image);
+	label_widget = gtk_label_new (_("Mesage Table"));
+	
+	gtk_notebook_append_page (GTK_NOTEBOOK (priv->panel),
+				  priv->message_table,
+				  label_widget);
 	
 	/*
 	 * Comment pane
@@ -647,9 +648,9 @@
  * gtranslator_tab_get_panel:
  * @tab: a #GtranslationTab
  * 
- * Return value: the horizontal #GtranslatorPanel of the #GtranslationTab
+ * Return value: the horizontal notebook of the #GtranslationTab
 **/
-GtranslatorPanel *
+GtkWidget *
 gtranslator_tab_get_panel(GtranslatorTab *tab)
 {
 	g_return_val_if_fail(tab != NULL, NULL);

Modified: branches/GOBJECT_WORK/src/tab.h
==============================================================================
--- branches/GOBJECT_WORK/src/tab.h	(original)
+++ branches/GOBJECT_WORK/src/tab.h	Thu Jan 31 17:01:37 2008
@@ -25,7 +25,6 @@
 
 #include "comment.h"
 #include "msg.h"
-#include "panel.h"
 #include "po.h"
 #include "view.h"
 
@@ -94,7 +93,7 @@
 void                   gtranslator_tab_set_state           (GtranslatorTab *tab,
 							    GtranslatorTabState state);
 
-GtranslatorPanel      *gtranslator_tab_get_panel           (GtranslatorTab *tab);
+GtkWidget             *gtranslator_tab_get_panel           (GtranslatorTab *tab);
 
 gint                   gtranslator_tab_get_active_text_tab (GtranslatorTab *tab);
 



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