gtranslator r3632 - in trunk: . plugins/open-tran



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

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

        * plugins/open-tran/Makefile.am:
        * plugins/open-tran/open-tran-panel.c:
        * plugins/open-tran/suse.png:
        Updated to latest web API and added suse icon.

Added:
   trunk/plugins/open-tran/suse.png
Modified:
   trunk/ChangeLog
   trunk/plugins/open-tran/Makefile.am
   trunk/plugins/open-tran/open-tran-panel.c

Modified: trunk/plugins/open-tran/Makefile.am
==============================================================================
--- trunk/plugins/open-tran/Makefile.am	(original)
+++ trunk/plugins/open-tran/Makefile.am	Mon Sep 22 09:40:03 2008
@@ -38,7 +38,8 @@
         kde.ico \
         mozilla.png \
         debian.png \
-	open-tran.png
+	open-tran.png \
+	suse.png
 
 # Plugin Info
 

Modified: trunk/plugins/open-tran/open-tran-panel.c
==============================================================================
--- trunk/plugins/open-tran/open-tran-panel.c	(original)
+++ trunk/plugins/open-tran/open-tran-panel.c	Mon Sep 22 09:40:03 2008
@@ -43,6 +43,7 @@
 #define KDE_ICON     PIXMAPSDIR"/kde.ico"
 #define MOZILLA_ICON PIXMAPSDIR"/mozilla.png"
 #define DEBIAN_ICON  PIXMAPSDIR"/debian.png"
+#define SUSE_ICON    PIXMAPSDIR"/suse.png"
 
 GTR_PLUGIN_DEFINE_TYPE(GtranslatorOpenTranPanel, gtranslator_open_tran_panel, GTK_TYPE_VBOX)
 
@@ -127,28 +128,18 @@
 	if (G_VALUE_HOLDS_STRING (value))
 	{
 		str = g_value_get_string (value);
-
-		/*
-		 * We have to parse the first character of str:
-		 * G - Gnome
-		 * K - KDE
-		 * M - Mozilla
-		 * D - Debian Installer
-		 * F - Frysian dictionary
-		 */
-		switch(*str)
-		{
-			case 'G': icon = create_pixbuf(GNOME_ICON);
-				break;
-			case 'K': icon = create_pixbuf(KDE_ICON);
-				break;
-			case 'M': icon = create_pixbuf(MOZILLA_ICON);
-				break;
-			case 'D': icon = create_pixbuf(DEBIAN_ICON);
-				break;
-			default: icon = NULL;
-				break;
-		}
+		
+		if (strcmp ("GNOME", str) == 0)
+			icon = create_pixbuf (GNOME_ICON);
+		else if (strcmp ("KDE", str) == 0)
+			icon = create_pixbuf (KDE_ICON);
+		else if (strcmp ("MOZILLA", str) == 0)
+			icon = create_pixbuf (MOZILLA_ICON);
+		else if (strcmp ("DEBIAN", str) == 0)
+			icon = create_pixbuf (DEBIAN_ICON);
+		else if (strcmp ("SUSE", str) == 0)
+			icon = create_pixbuf (SUSE_ICON);
+		else icon = NULL;
 		
 		gtk_list_store_append(panel->priv->store, &iter);
 		gtk_list_store_set(panel->priv->store, &iter,

Added: trunk/plugins/open-tran/suse.png
==============================================================================
Binary files (empty file) and trunk/plugins/open-tran/suse.png	Mon Sep 22 09:40:03 2008 differ



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