gnome-panel r11366 - in trunk: . gnome-panel libpanel-applet



Author: vuntz
Date: Mon Dec  8 15:55:16 2008
New Revision: 11366
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11366&view=rev

Log:
2008-12-08  Vincent Untz  <vuntz gnome org>

	* configure.in: require glib 2.18.0 for C_().
	Fix bug #558418, part of a GNOME Goal.

2008-12-08  Vincent Untz  <vuntz gnome org>

	* panel-action-button.c: use C_() instead of Q_().
	* panel-menu-items.c: (panel_place_menu_item_create_menu),
	(panel_menu_items_append_lock_logout): ditto
	* panel-properties-dialog.c:
	(panel_properties_dialog_setup_orientation_combo): use NC_() and
	then g_dpgettext2() instead of Q_()
	Based on patch by Philip Withnall <bugzilla tecnocode co uk>
	Fix bug #558418, part of a GNOME Goal.

2008-12-08  Vincent Untz  <vuntz gnome org>

	* panel-test-applets.c: (setup_combo), (setup_options): use NC_() and
	then g_dpgettext2() instead of Q_()
	Based on patch by Philip Withnall <bugzilla tecnocode co uk>
	Fix bug #558418, part of a GNOME Goal.


Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/gnome-panel/ChangeLog
   trunk/gnome-panel/panel-action-button.c
   trunk/gnome-panel/panel-menu-items.c
   trunk/gnome-panel/panel-properties-dialog.c
   trunk/libpanel-applet/ChangeLog
   trunk/libpanel-applet/panel-test-applets.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Dec  8 15:55:16 2008
@@ -51,7 +51,7 @@
 LIBGNOME_DESKTOP_REQUIRED=2.11.1
 GDK_PIXBUF_REQUIRED=2.7.1
 PANGO_REQUIRED=1.15.4
-GLIB_REQUIRED=2.15.6
+GLIB_REQUIRED=2.18.0
 GTK_REQUIRED=2.13.1
 LIBGLADE_REQUIRED=2.5.0
 LIBGNOME_REQUIRED=2.13.0

Modified: trunk/gnome-panel/panel-action-button.c
==============================================================================
--- trunk/gnome-panel/panel-action-button.c	(original)
+++ trunk/gnome-panel/panel-action-button.c	Mon Dec  8 15:55:16 2008
@@ -307,7 +307,7 @@
 		PANEL_ICON_LOGOUT,
 		/* when changing one of those two strings, don't forget to
 		 * update the ones in panel-menu-items.c (look for
-		 * panel:showusername|1) */
+		 * "1" (msgctxt: "panel:showusername")) */
 		N_("Log Out..."),
 		N_("Log out of this session to log in as a different user"),
 		"gospanel-20",

Modified: trunk/gnome-panel/panel-menu-items.c
==============================================================================
--- trunk/gnome-panel/panel-menu-items.c	(original)
+++ trunk/gnome-panel/panel-menu-items.c	Mon Dec  8 15:55:16 2008
@@ -964,9 +964,8 @@
 				PANEL_ICON_DESKTOP, NULL,
 				/* Translators: Desktop is used here as in
 				 * "Desktop Folder" (this is not the Desktop
-				 * environment). Do not keep "Desktop Folder|"
-				 * in the translation */
-				Q_("Desktop Folder|Desktop"),
+				 * environment). */
+				C_("Desktop Folder", "Desktop"),
 				_("Open the contents of your desktop in a folder"),
 				places_menu,
 				G_CALLBACK (activate_desktop_uri),
@@ -1465,11 +1464,11 @@
 		return;
 	/* Below this, we only have log out/shutdown items */
 
-	/* Translators: translate "panel:showusername|1" to anything
+	/* Translators: translate "1" (msgctxt: "panel:showusername") to anything
 	 * but "1" if "Log Out %s" doesn't make any sense in your
 	 * language (where %s is a username).
 	 */
-	translate = Q_("panel:showusername|1");
+	translate = C_("panel:showusername", "1");
 	if (strcmp (translate, "1") == 0) {
 		const char *user_name;
 
@@ -1480,11 +1479,11 @@
 		/* keep those strings in sync with the ones in
 		 * panel-action-button.c */
 		/* Translators: this string is used ONLY if you translated
-		 * "panel:showusername|1" to "1" */
+		 * "1" (msgctxt: "panel:showusername") to "1" */
 		label = g_strdup_printf (_("Log Out %s..."),
 					 g_get_user_name ());
 		/* Translators: this string is used ONLY if you translated
-		 * "panel:showusername|1" to "1" */
+		 * "1" (msgctxt: "panel:showusername") to "1" */
 		tooltip = g_strdup_printf (_("Log out %s of this session to "
 					     "log in as a different user"),
 					   user_name);

Modified: trunk/gnome-panel/panel-properties-dialog.c
==============================================================================
--- trunk/gnome-panel/panel-properties-dialog.c	(original)
+++ trunk/gnome-panel/panel-properties-dialog.c	Mon Dec  8 15:55:16 2008
@@ -124,10 +124,10 @@
 } OrientationComboItem;
 
 static OrientationComboItem orientation_items [] = {
-	{ N_("Orientation|Top"),    PANEL_ORIENTATION_TOP    },
-	{ N_("Orientation|Bottom"), PANEL_ORIENTATION_BOTTOM },
-	{ N_("Orientation|Left"),   PANEL_ORIENTATION_LEFT   },
-	{ N_("Orientation|Right"),  PANEL_ORIENTATION_RIGHT  }
+	{ NC_("Orientation", "Top"),    PANEL_ORIENTATION_TOP    },
+	{ NC_("Orientation", "Bottom"), PANEL_ORIENTATION_BOTTOM },
+	{ NC_("Orientation", "Left"),   PANEL_ORIENTATION_LEFT   },
+	{ NC_("Orientation", "Right"),  PANEL_ORIENTATION_RIGHT  }
 };
 
 static void
@@ -179,7 +179,7 @@
 	for (i = 0; i < G_N_ELEMENTS (orientation_items); i++) {
 		gtk_list_store_append (model, &iter);
 		gtk_list_store_set (model, &iter,
-				    COLUMN_TEXT, Q_(orientation_items [i].name),
+				    COLUMN_TEXT, g_dpgettext2 (NULL, "Orientation", orientation_items [i].name),
 				    COLUMN_ITEM, &(orientation_items [i]),
 				    -1);
 		if (orientation == orientation_items [i].orientation)

Modified: trunk/libpanel-applet/panel-test-applets.c
==============================================================================
--- trunk/libpanel-applet/panel-test-applets.c	(original)
+++ trunk/libpanel-applet/panel-test-applets.c	Mon Dec  8 15:55:16 2008
@@ -50,21 +50,21 @@
 } ComboItem;
 
 static ComboItem orient_items [] = {
-	{ N_("Orientation|Top"),    "top"    },
-	{ N_("Orientation|Bottom"), "bottom" },
-	{ N_("Orientation|Left"),   "left"   },
-	{ N_("Orientation|Right"),  "right"  }
+	{ NC_("Orientation", "Top"),    "top"    },
+	{ NC_("Orientation", "Bottom"), "bottom" },
+	{ NC_("Orientation", "Left"),   "left"   },
+	{ NC_("Orientation", "Right"),  "right"  }
 };
 
 
 static ComboItem size_items [] = {
-	{ N_("Size|XX Small"), "xx-small" },
-	{ N_("Size|X Small"),  "x-small"  },
-	{ N_("Size|Small"),    "small"    },
-	{ N_("Size|Medium"),   "medium"   },
-	{ N_("Size|Large"),    "large"    },
-	{ N_("Size|X Large"),  "x-large"  },
-	{ N_("Size|XX Large"), "xx-large" }
+	{ NC_("Size", "XX Small"), "xx-small" },
+	{ NC_("Size", "X Small"),  "x-small"  },
+	{ NC_("Size", "Small"),    "small"    },
+	{ NC_("Size", "Medium"),   "medium"   },
+	{ NC_("Size", "Large"),    "large"    },
+	{ NC_("Size", "X Large"),  "x-large"  },
+	{ NC_("Size", "XX Large"), "xx-large" }
 };
 
 static char *
@@ -192,10 +192,11 @@
 }
 
 static void
-setup_combo (GtkWidget *combo_box,
-	     ComboItem *items,
-	     int        nb_items,
-	     gboolean   dynamic)
+setup_combo (GtkWidget  *combo_box,
+	     ComboItem  *items,
+	     const char *context,
+	     int         nb_items,
+	     gboolean    dynamic)
 {
 	GtkListStore          *model;
 	GtkTreeIter            iter;
@@ -213,7 +214,7 @@
 	for (i = 0; i < nb_items; i++) {
 		gtk_list_store_append (model, &iter);
 		gtk_list_store_set (model, &iter,
-				    COLUMN_TEXT, dynamic ? g_strdup (items [i].name) : Q_(items [i].name),
+				    COLUMN_TEXT, dynamic ? g_strdup (items [i].name) : g_dpgettext2 (NULL, context, items [i].name),
 				    COLUMN_ITEM, dynamic ? g_strdup (items [i].value) : items [i].value,
 				    -1);
 	}
@@ -261,12 +262,13 @@
 		applet_items[i].value = info->iid;
 	}
 
-	setup_combo (applet_combo, applet_items, applet_nb, TRUE);
+	setup_combo (applet_combo, applet_items, NULL, applet_nb, TRUE);
 	g_free (applet_items);
 	CORBA_free (applets);
 
-	setup_combo (size_combo, size_items, G_N_ELEMENTS (size_items), FALSE);
-	setup_combo (orient_combo, orient_items,
+	setup_combo (size_combo, size_items, "Size",
+		     G_N_ELEMENTS (size_items), FALSE);
+	setup_combo (orient_combo, orient_items, "Orientation",
 		     G_N_ELEMENTS (orient_items), FALSE);
 
 	unique_key = gconf_unique_key ();



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