[Goodies-commits] r5786 - in xfce4-power-manager/trunk: po src

Ali Abdallah aliov at xfce.org
Fri Oct 24 12:17:52 CEST 2008


Author: aliov
Date: 2008-10-24 10:17:52 +0000 (Fri, 24 Oct 2008)
New Revision: 5786

Modified:
   xfce4-power-manager/trunk/po/xfce4-power-manager.pot
   xfce4-power-manager/trunk/src/xfpm-dpms-spins.c
   xfce4-power-manager/trunk/src/xfpm-settings.c
Log:
Remove all the space in the strings and concatenate them instead

Modified: xfce4-power-manager/trunk/po/xfce4-power-manager.pot
===================================================================
--- xfce4-power-manager/trunk/po/xfce4-power-manager.pot	2008-10-24 09:51:33 UTC (rev 5785)
+++ xfce4-power-manager/trunk/po/xfce4-power-manager.pot	2008-10-24 10:17:52 UTC (rev 5786)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-24 08:37+0200\n"
+"POT-Creation-Date: 2008-10-24 12:14+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -33,8 +33,8 @@
 msgstr ""
 
 #: xfpm-ac-adapter.c:359 xfpm-ac-adapter.c:395 xfpm-battery.c:817
-#: xfpm-battery.c:924 xfpm-battery.c:959 xfpm-settings.c:463
-#: xfpm-settings.c:930 xfpm-settings.c:959 xfpm-settings.c:982
+#: xfpm-battery.c:924 xfpm-battery.c:959 xfpm-settings.c:465
+#: xfpm-settings.c:932 xfpm-settings.c:961 xfpm-settings.c:984
 msgid "Hibernate"
 msgstr ""
 
@@ -43,8 +43,8 @@
 msgstr ""
 
 #: xfpm-ac-adapter.c:373 xfpm-ac-adapter.c:412 xfpm-battery.c:939
-#: xfpm-battery.c:974 xfpm-settings.c:928 xfpm-settings.c:957
-#: xfpm-settings.c:980
+#: xfpm-battery.c:974 xfpm-settings.c:930 xfpm-settings.c:959
+#: xfpm-settings.c:982
 msgid "Suspend"
 msgstr ""
 
@@ -154,8 +154,8 @@
 msgid "Hibernate the system"
 msgstr ""
 
-#: xfpm-battery.c:824 xfpm-settings.c:459 xfpm-settings.c:932
-#: xfpm-settings.c:961 xfpm-settings.c:984
+#: xfpm-battery.c:824 xfpm-settings.c:461 xfpm-settings.c:934
+#: xfpm-settings.c:963 xfpm-settings.c:986
 msgid "Shutdown"
 msgstr ""
 
@@ -167,28 +167,26 @@
 msgid "Xfce4 Power Manager"
 msgstr ""
 
-#: xfpm-dpms-spins.c:124
-msgid "Standby after"
+#: xfpm-dpms-spins.c:48
+msgid "never"
 msgstr ""
 
-#: xfpm-dpms-spins.c:128 xfpm-dpms-spins.c:136 xfpm-dpms-spins.c:144
-#: xfpm-dpms-spins.c:186 xfpm-dpms-spins.c:245 xfpm-dpms-spins.c:293
-msgid " min"
+#: xfpm-dpms-spins.c:49
+msgid "min"
 msgstr ""
 
-#: xfpm-dpms-spins.c:132
+#: xfpm-dpms-spins.c:127
+msgid "Standby after"
+msgstr ""
+
+#: xfpm-dpms-spins.c:135
 msgid "Suspend after"
 msgstr ""
 
-#: xfpm-dpms-spins.c:140
+#: xfpm-dpms-spins.c:143
 msgid "Turn off after"
 msgstr ""
 
-#: xfpm-dpms-spins.c:178 xfpm-dpms-spins.c:237 xfpm-dpms-spins.c:285
-#: xfpm-dpms-spins.c:330 xfpm-dpms-spins.c:333 xfpm-dpms-spins.c:336
-msgid " never"
-msgstr ""
-
 #: xfpm-driver.c:287
 msgid ""
 "Unable to read AC adapter status, the power manager will not work properly. "
@@ -306,170 +304,170 @@
 msgstr ""
 
 #: xfpm-settings.c:442
-msgid " percent"
+msgid "percent"
 msgstr ""
 
-#: xfpm-settings.c:450
+#: xfpm-settings.c:452
 msgid "When battery charge level is critical do"
 msgstr ""
 
-#: xfpm-settings.c:456 xfpm-settings.c:926 xfpm-settings.c:955
-#: xfpm-settings.c:978
+#: xfpm-settings.c:458 xfpm-settings.c:928 xfpm-settings.c:957
+#: xfpm-settings.c:980
 msgid "Nothing"
 msgstr ""
 
-#: xfpm-settings.c:477
+#: xfpm-settings.c:479
 msgid "Enable ups charge notification"
 msgstr ""
 
-#: xfpm-settings.c:477
+#: xfpm-settings.c:479
 msgid "Enable battery state notification"
 msgstr ""
 
-#: xfpm-settings.c:491
+#: xfpm-settings.c:493
 msgid "Enable power save on ups power"
 msgstr ""
 
-#: xfpm-settings.c:491
+#: xfpm-settings.c:493
 msgid "Enable power save on battery power"
 msgstr ""
 
-#: xfpm-settings.c:530 xfpm-settings.c:623
+#: xfpm-settings.c:532 xfpm-settings.c:625
 msgid "Performance"
 msgstr ""
 
-#: xfpm-settings.c:535 xfpm-settings.c:628
+#: xfpm-settings.c:537 xfpm-settings.c:630
 msgid "Ondemand"
 msgstr ""
 
-#: xfpm-settings.c:539 xfpm-settings.c:632
+#: xfpm-settings.c:541 xfpm-settings.c:634
 msgid "Userspace"
 msgstr ""
 
-#: xfpm-settings.c:543 xfpm-settings.c:636
+#: xfpm-settings.c:545 xfpm-settings.c:638
 msgid "Powersave"
 msgstr ""
 
-#: xfpm-settings.c:547 xfpm-settings.c:640
+#: xfpm-settings.c:549 xfpm-settings.c:642
 msgid "Conservative"
 msgstr ""
 
-#: xfpm-settings.c:615
+#: xfpm-settings.c:617
 msgid "CPU governor settings on ups power"
 msgstr ""
 
-#: xfpm-settings.c:615
+#: xfpm-settings.c:617
 msgid "CPU governor settings on battery power"
 msgstr ""
 
-#: xfpm-settings.c:714
+#: xfpm-settings.c:716
 msgid "No CPU governor found"
 msgstr ""
 
-#: xfpm-settings.c:724
+#: xfpm-settings.c:726
 msgid "CPU frequency control cannot be used"
 msgstr ""
 
-#: xfpm-settings.c:736
+#: xfpm-settings.c:738
 msgid "Cpu freq settings on electric power"
 msgstr ""
 
-#: xfpm-settings.c:736
+#: xfpm-settings.c:738
 msgid "Cpu freq settings"
 msgstr ""
 
-#: xfpm-settings.c:758
+#: xfpm-settings.c:760
 msgid "Enable lcd brigthness control"
 msgstr ""
 
-#: xfpm-settings.c:780
+#: xfpm-settings.c:782
 msgid "Monitor DPMS settings on ups power"
 msgstr ""
 
-#: xfpm-settings.c:780
+#: xfpm-settings.c:782
 msgid "Monitor DPMS settings on battery power"
 msgstr ""
 
-#: xfpm-settings.c:868
+#: xfpm-settings.c:870
 msgid "Monitor settings on electric power"
 msgstr ""
 
-#: xfpm-settings.c:868
+#: xfpm-settings.c:870
 msgid "Monitor settings"
 msgstr ""
 
-#: xfpm-settings.c:881
+#: xfpm-settings.c:883
 msgid "Your monitor doesn't support DPMS control"
 msgstr ""
 
-#: xfpm-settings.c:912
+#: xfpm-settings.c:914
 msgid "Keyboard shortcuts"
 msgstr ""
 
-#: xfpm-settings.c:921
+#: xfpm-settings.c:923
 msgid "When power button is pressed do"
 msgstr ""
 
-#: xfpm-settings.c:947
+#: xfpm-settings.c:949
 msgid "When sleep button is pressed do"
 msgstr ""
 
-#: xfpm-settings.c:972
+#: xfpm-settings.c:974
 msgid "When lid button is pressed do"
 msgstr ""
 
-#: xfpm-settings.c:996
+#: xfpm-settings.c:998
 msgid "No available keyboard shortcuts found"
 msgstr ""
 
-#: xfpm-settings.c:1012
+#: xfpm-settings.c:1014
 msgid "General Options"
 msgstr ""
 
-#: xfpm-settings.c:1019
+#: xfpm-settings.c:1021
 msgid "System tray icon"
 msgstr ""
 
-#: xfpm-settings.c:1025
+#: xfpm-settings.c:1027
 msgid "Always Display an icon"
 msgstr ""
 
-#: xfpm-settings.c:1026
+#: xfpm-settings.c:1028
 msgid "When battery is present"
 msgstr ""
 
-#: xfpm-settings.c:1029
+#: xfpm-settings.c:1031
 msgid "When battery is charging or discharging"
 msgstr ""
 
-#: xfpm-settings.c:1045
+#: xfpm-settings.c:1047
 msgid "Enable CPU freq scaling control"
 msgstr ""
 
-#: xfpm-settings.c:1058
+#: xfpm-settings.c:1060
 msgid "Enable DPMS control"
 msgstr ""
 
-#: xfpm-settings.c:1115
+#: xfpm-settings.c:1117
 msgid "Advanced settings"
 msgstr ""
 
-#: xfpm-settings.c:1132 xfpm-settings.c:1137
+#: xfpm-settings.c:1134 xfpm-settings.c:1139
 msgid "Cpu settings"
 msgstr ""
 
-#: xfpm-settings.c:1147 xfpm-settings.c:1152
+#: xfpm-settings.c:1149 xfpm-settings.c:1154
 msgid "Battery settings"
 msgstr ""
 
-#: xfpm-settings.c:1163 xfpm-settings.c:1168
+#: xfpm-settings.c:1165 xfpm-settings.c:1170
 msgid "Shortcuts"
 msgstr ""
 
-#: xfpm-settings.c:1178 xfpm-settings.c:1183
+#: xfpm-settings.c:1180 xfpm-settings.c:1185
 msgid "Monitor Settings"
 msgstr ""
 
-#: xfpm-settings.c:1215
+#: xfpm-settings.c:1217
 msgid "Power Manager Preferences"
 msgstr ""

Modified: xfce4-power-manager/trunk/src/xfpm-dpms-spins.c
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-dpms-spins.c	2008-10-24 09:51:33 UTC (rev 5785)
+++ xfce4-power-manager/trunk/src/xfpm-dpms-spins.c	2008-10-24 10:17:52 UTC (rev 5786)
@@ -45,6 +45,9 @@
 #define _(x) x
 #endif
 
+#define SUFFIX_NEVER _("never")
+#define SUFFIX_MIN   _("min")
+
 #ifdef HAVE_DPMS
 
 /* init */
@@ -120,12 +123,12 @@
                  NULL);
                  
     GtkWidget *label;
-    
+	gchar *suffix = g_strdup_printf(" %s",SUFFIX_MIN);
     label = gtk_label_new(_("Standby after"));
     gtk_widget_show(label);
     gtk_table_attach_defaults(GTK_TABLE(dpms_spins),label,0,1,0,1);
     priv->spin_1 = xfpm_spin_button_new_with_range(0,298,1);
-    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_1),_(" min"));
+    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_1),suffix);
     gtk_widget_show(priv->spin_1);
     gtk_table_attach(GTK_TABLE(dpms_spins),priv->spin_1,1,2,0,1,GTK_SHRINK,GTK_SHRINK,0,0);
     
@@ -133,7 +136,7 @@
     gtk_widget_show(label);
     gtk_table_attach_defaults(GTK_TABLE(dpms_spins),label,0,1,1,2);
     priv->spin_2 = xfpm_spin_button_new_with_range(0,299,1);
-    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_2),_(" min"));
+    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_2),suffix);
     gtk_widget_show(priv->spin_2);
     gtk_table_attach(GTK_TABLE(dpms_spins),priv->spin_2,1,2,1,2,GTK_SHRINK,GTK_SHRINK,0,0);
     
@@ -141,7 +144,7 @@
     gtk_widget_show(label);
     gtk_table_attach_defaults(GTK_TABLE(dpms_spins),label,0,1,2,3);
     priv->spin_3 = xfpm_spin_button_new_with_range(0,300,1);
-    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_3),_(" min"));
+    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_3),suffix);
     gtk_widget_show(priv->spin_3);
     gtk_table_attach(GTK_TABLE(dpms_spins),priv->spin_3,1,2,2,3,GTK_SHRINK,GTK_SHRINK,0,0);
     
@@ -150,6 +153,7 @@
     g_signal_connect(priv->spin_1,"value-changed",G_CALLBACK(xfpm_dpms_spins_get_spin1_value_cb),dpms_spins);
     g_signal_connect(priv->spin_2,"value-changed",G_CALLBACK(xfpm_dpms_spins_get_spin2_value_cb),dpms_spins);
     g_signal_connect(priv->spin_3,"value-changed",G_CALLBACK(xfpm_dpms_spins_get_spin3_value_cb),dpms_spins);
+	g_free(suffix);
 }
 
 static void
@@ -171,20 +175,24 @@
     value1 = gtk_spin_button_get_value(spin_1);
     value2 = gtk_spin_button_get_value(GTK_SPIN_BUTTON(priv->spin_2));
     value3 = gtk_spin_button_get_value(GTK_SPIN_BUTTON(priv->spin_3));
-    
+	
     if ( value1 == 0 )
     {
         priv->spin_value_1 = 0;
-        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_1),_(" never"));
+		gchar *suffix = g_strdup_printf(" %s",SUFFIX_NEVER);
+        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_1),suffix);
         g_signal_emit(G_OBJECT(spins),signals[DPMS_VALUE_CHANGED],0,
                   value1,value2,value3);
+		g_free(suffix);
         return;
     }
 
     if ( priv->spin_value_1 == 0 )
     {
-        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_1),_(" min"));
+		gchar *suffix = g_strdup_printf(" %s",SUFFIX_MIN);
+        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_1),suffix);
         priv->spin_value_1 = value1;
+		g_free(suffix);
     }
     
     if ( value2 <= value1 && value2 != 0 )
@@ -234,16 +242,20 @@
     if ( value2 == 0 )
     {
         priv->spin_value_2 = 0;
-        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_2),_(" never"));
+		gchar *suffix = g_strdup_printf(" %s",SUFFIX_NEVER);
+        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_2),suffix);
         g_signal_emit(G_OBJECT(spins),signals[DPMS_VALUE_CHANGED],0,value1,value2,value3);
+		g_free(suffix);
          
         return;
     }
     
     if ( priv->spin_value_2 == 0 )
     {
-        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_2),_(" min"));
+		gchar *suffix = g_strdup_printf(" %s",SUFFIX_MIN);
+        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_2),suffix);
         priv->spin_value_2 = value2;
+		g_free(suffix);
     }
 
     if ( value2 <= value1 && value2 != 0)
@@ -282,16 +294,19 @@
     if ( value3 == 0 )
     {
         priv->spin_value_3 = 0;
-        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_3),_(" never"));
+		gchar *suffix = g_strdup_printf(" %s",SUFFIX_NEVER);
+        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_3),suffix);
         g_signal_emit(G_OBJECT(spins),signals[DPMS_VALUE_CHANGED],0,value1,value2,value3);
-         
+         g_free(suffix);
         return;
     }
     
     if ( priv->spin_value_3 == 0 )
     {
-        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_3),_(" min"));
+		gchar *suffix = g_strdup_printf(" %s",SUFFIX_NEVER);
+        xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(spin_3),suffix);
         priv->spin_value_3 = value3;
+		g_free(suffix);
     }
 
     if ( value3 <= value2 && value3 != 0 )
@@ -327,15 +342,18 @@
 {
     XfpmDpmsSpinsPrivate *priv;
     priv = XFPM_DPMS_SPINS_GET_PRIVATE(spins);
-    if ( spin_1 == 0) xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_1),_(" never"));
+	gchar *suffix = g_strdup_printf(" %s",SUFFIX_NEVER);
+	
+    if ( spin_1 == 0) xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_1),suffix);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->spin_1),spin_1);
     
-    if ( spin_2 == 0) xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_2),_(" never"));
+    if ( spin_2 == 0) xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_2),suffix);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->spin_2),spin_2);
     
-    if ( spin_3 == 0) xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_3),_(" never"));
+    if ( spin_3 == 0) xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(priv->spin_3),suffix);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->spin_3),spin_3);
     
+	g_free(suffix);
 }   
 
 void   

Modified: xfce4-power-manager/trunk/src/xfpm-settings.c
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-settings.c	2008-10-24 09:51:33 UTC (rev 5785)
+++ xfce4-power-manager/trunk/src/xfpm-settings.c	2008-10-24 10:17:52 UTC (rev 5786)
@@ -439,7 +439,9 @@
     gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,0,1);
     
     critical_spin = xfpm_spin_button_new_with_range(1,20,1);
-    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(critical_spin),_(" percent"));
+	gchar *suffix = g_strdup_printf(" %s",_("percent"));
+    xfpm_spin_button_set_suffix(XFPM_SPIN_BUTTON(critical_spin),suffix);
+	g_free(suffix);
     gtk_widget_show(critical_spin);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(critical_spin),
                               xfconf_channel_get_uint(channel,CRITICAL_BATT_CFG,10));




More information about the Goodies-commits mailing list