[vinagre] Drop markups on all strings. Closes #498402
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Subject: [vinagre] Drop markups on all strings. Closes #498402
- Date: Wed, 29 Jul 2009 01:35:24 +0000 (UTC)
commit 17693e830f38117cc3d6566e745d7dfe12fbc4c9
Author: Jonh Wendell <jwendell gnome org>
Date: Tue Jul 28 22:33:07 2009 -0300
Drop markups on all strings. Closes #498402
data/vinagre.ui | 82 +++++++++++++++++++++++++------------
plugins/vnc/vinagre-vnc-plugin.c | 5 ++-
plugins/vnc/vinagre-vnc-tab.c | 15 ++++---
vinagre/vinagre-bookmarks-ui.c | 10 +++-
vinagre/vinagre-connect.c | 8 +--
vinagre/vinagre-notebook.c | 18 ++++++---
6 files changed, 89 insertions(+), 49 deletions(-)
---
diff --git a/data/vinagre.ui b/data/vinagre.ui
index 1f8dec3..0fb7dad 100644
--- a/data/vinagre.ui
+++ b/data/vinagre.ui
@@ -21,8 +21,10 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Which machine do you want to connect to?</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Which machine do you want to connect to?</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -62,6 +64,7 @@
<object class="GtkLabel" id="host_label">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">_Host:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">host_entry</property>
@@ -71,8 +74,6 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
</packing>
</child>
<child>
@@ -102,8 +103,8 @@
<child>
<object class="GtkLabel" id="protocol_label">
<property name="visible">True</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">_Protocol:</property>
- <property name="use_markup">True</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">protocol_combo</property>
</object>
@@ -128,7 +129,10 @@
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="xpad">5</property>
- <property name="use_markup">True</property>
+ <attributes>
+ <attribute name="style" value="italic"/>
+ <attribute name="scale" value="0.850000"/>
+ </attributes>
</object>
<packing>
<property name="position">1</property>
@@ -154,8 +158,10 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Connection options</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Connection options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -286,9 +292,11 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Authentication is required</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Authentication is required</property>
<property name="wrap">True</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="padding">6</property>
@@ -362,7 +370,9 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="use_markup">True</property>
+ <attributes>
+ <attribute name="style" value="italic"/>
+ </attributes>
</object>
<packing>
<property name="left_attach">2</property>
@@ -419,8 +429,11 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><i><small>All fields above are mandatory</small></i></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">All fields above are mandatory</property>
+ <attributes>
+ <attribute name="style" value="italic"/>
+ <attribute name="scale" value="0.850000"/>
+ </attributes>
</object>
<packing>
<property name="left_attach">1</property>
@@ -533,8 +546,10 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Connection</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Connection</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -547,8 +562,11 @@
<object class="GtkLabel" id="protocol_label">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label"><small>(Type: <i>VNC</i>)</small></property>
- <property name="use_markup">True</property>
+ <property name="label">Protocol: VNC</property>
+ <attributes>
+ <attribute name="style" value="italic"/>
+ <attribute name="scale" value="0.850000"/>
+ </attributes>
</object>
<packing>
<property name="position">1</property>
@@ -656,8 +674,10 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Options</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -716,8 +736,10 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Folder</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Folder</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -827,8 +849,10 @@
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Interface</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Interface</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -957,8 +981,10 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Folder</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Folder</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -1027,8 +1053,10 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Parent Folder</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Parent Folder</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
diff --git a/plugins/vnc/vinagre-vnc-plugin.c b/plugins/vnc/vinagre-vnc-plugin.c
index b7d3bff..8a96683 100644
--- a/plugins/vnc/vinagre-vnc-plugin.c
+++ b/plugins/vnc/vinagre-vnc-plugin.c
@@ -205,10 +205,13 @@ impl_get_connect_widget (VinagrePlugin *plugin, VinagreConnection *conn)
{
GtkWidget *box, *check, *label;
GtkTable *table;
+ gchar *str;
box = gtk_vbox_new (TRUE, 0);
- label = gtk_label_new (_("<b>VNC Options</b>"));
+ str = g_strdup_printf ("<b>%s</b>", _("VNC Options"));
+ label = gtk_label_new (str);
+ g_free (str);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
diff --git a/plugins/vnc/vinagre-vnc-tab.c b/plugins/vnc/vinagre-vnc-tab.c
index d3dfeef..1edda01 100644
--- a/plugins/vnc/vinagre-vnc-tab.c
+++ b/plugins/vnc/vinagre-vnc-tab.c
@@ -288,14 +288,16 @@ static void
vnc_auth_unsupported_cb (VncDisplay *vnc, guint auth_type, VinagreVncTab *vnc_tab)
{
GString *message;
- gchar *name;
+ gchar *name, *emphasis;
VinagreTab *tab = VINAGRE_TAB (vnc_tab);
message = g_string_new (NULL);
name = vinagre_connection_get_best_name (vinagre_tab_get_conn (tab));
+ emphasis = g_strdup_printf ("<i>%s</i>", name);
- g_string_printf (message, _("Authentication method to host <i>%s</i> is unsupported. (%u)"),
- name,
+ /* Translators: %s is a host name or IP address; %u is a code error (number). */
+ g_string_printf (message, _("Authentication method to host %s is unsupported. (%u)"),
+ emphasis,
auth_type);
vinagre_utils_show_error (_("Authentication unsupported"),
@@ -303,6 +305,7 @@ vnc_auth_unsupported_cb (VncDisplay *vnc, guint auth_type, VinagreVncTab *vnc_ta
GTK_WINDOW (vinagre_tab_get_window (tab)));
g_string_free (message, TRUE);
g_free (name);
+ g_free (emphasis);
vinagre_tab_remove_from_notebook (tab);
}
@@ -417,7 +420,7 @@ ask_credential (VinagreVncTab *vnc_tab,
GtkBuilder *xml;
GtkWidget *password_dialog, *host_label, *save_credential_check;
GtkWidget *password_label, *username_label, *image;
- gchar *name, *label;
+ gchar *name;
int result;
ControlOKButton control;
VinagreTab *tab = VINAGRE_TAB (vnc_tab);
@@ -431,10 +434,8 @@ ask_credential (VinagreVncTab *vnc_tab,
host_label = GTK_WIDGET (gtk_builder_get_object (xml, "host_label"));
name = vinagre_connection_get_best_name (conn);
- label = g_strdup_printf ("<i>%s</i>", name);
- gtk_label_set_markup (GTK_LABEL (host_label), label);
+ gtk_label_set_label (GTK_LABEL (host_label), name);
g_free (name);
- g_free (label);
control.uname = GTK_WIDGET (gtk_builder_get_object (xml, "username_entry"));
control.pw = GTK_WIDGET (gtk_builder_get_object (xml, "password_entry"));
diff --git a/vinagre/vinagre-bookmarks-ui.c b/vinagre/vinagre-bookmarks-ui.c
index 25ca19e..1249123 100644
--- a/vinagre/vinagre-bookmarks-ui.c
+++ b/vinagre/vinagre-bookmarks-ui.c
@@ -164,8 +164,9 @@ show_dialog_conn (VinagreBookmarks *book,
gtk_widget_hide (plugin_box);
props = vinagre_plugin_get_public_description (plugin);
- str = g_strdup_printf (_("<small>(Protocol: <i>%s</i>)</small>"), props[0]);
- gtk_label_set_markup (GTK_LABEL (protocol_label), str);
+ /* Translators: %s is a protocol name, like VNC or SSH */
+ str = g_strdup_printf (_("(Protocol: %s)"), props[0]);
+ gtk_label_set_label (GTK_LABEL (protocol_label), str);
g_free (str);
g_strfreev (props);
@@ -301,7 +302,10 @@ vinagre_bookmarks_del (VinagreBookmarks *book,
g_return_if_fail (VINAGRE_IS_BOOKMARKS (book));
g_return_if_fail (VINAGRE_IS_BOOKMARKS_ENTRY (entry));
- msg1 = g_strdup (_("Are you sure you want to remove <i>%s</i> from bookmarks?"));
+ name = g_strdup ("<i>%s</i>");
+ /* Translators: %s is a bookmark entry name*/
+ msg1 = g_strdup_printf (_("Are you sure you want to remove %s from bookmarks?"), name);
+ g_free (name);
if (vinagre_bookmarks_entry_get_node (entry) == VINAGRE_BOOKMARKS_ENTRY_NODE_FOLDER)
{
diff --git a/vinagre/vinagre-connect.c b/vinagre/vinagre-connect.c
index 53c2573..0c3b9ec 100644
--- a/vinagre/vinagre-connect.c
+++ b/vinagre/vinagre-connect.c
@@ -76,7 +76,7 @@ static void
protocol_combo_changed (GtkComboBox *combo, VinagreConnectDialog *dialog)
{
GtkTreeIter tree_iter;
- gchar *description, *label, *service;
+ gchar *description, *service;
GtkWidget *options;
GList *children, *l;
@@ -92,9 +92,8 @@ protocol_combo_changed (GtkComboBox *combo, VinagreConnectDialog *dialog)
PROTOCOL_OPTIONS, &options,
-1);
- label = g_strdup_printf ("<i><small>%s</small></i>", description);
- gtk_label_set_markup (GTK_LABEL (dialog->protocol_description_label),
- label);
+ gtk_label_set_label (GTK_LABEL (dialog->protocol_description_label),
+ description);
#ifdef VINAGRE_ENABLE_AVAHI
if (service)
@@ -117,7 +116,6 @@ protocol_combo_changed (GtkComboBox *combo, VinagreConnectDialog *dialog)
else
gtk_widget_hide (dialog->plugin_box);
- g_free (label);
g_free (description);
g_free (service);
}
diff --git a/vinagre/vinagre-notebook.c b/vinagre/vinagre-notebook.c
index 3378328..edb4ed7 100644
--- a/vinagre/vinagre-notebook.c
+++ b/vinagre/vinagre-notebook.c
@@ -395,14 +395,17 @@ tab_size_changed_cb (VinagreTab *tab, VinagreNotebook *nb)
static void
tab_disconnected_cb (VinagreTab *tab, VinagreNotebook *nb)
{
- gchar *message, *name;
+ gchar *message, *name, *emphasis;
name = vinagre_connection_get_best_name (vinagre_tab_get_conn (tab));
- message = g_strdup_printf (_("Connection to host <i>%s</i> was closed."),
- name);
+ emphasis = g_strdup_printf ("<i>%s</i>", name);
+ /* Translators: %s is a host name or IP address. */
+ message = g_strdup_printf (_("Connection to host %s was closed."),
+ emphasis);
vinagre_utils_show_error (_("Connection closed"), message, GTK_WINDOW (nb->priv->window));
g_free (message);
g_free (name);
+ g_free (emphasis);
vinagre_notebook_close_tab (nb, tab);
}
@@ -411,13 +414,15 @@ static void
tab_auth_failed_cb (VinagreTab *tab, const gchar *msg, VinagreNotebook *nb)
{
GString *message;
- gchar *name;
+ gchar *name, *emphasis;
message = g_string_new (NULL);
name = vinagre_connection_get_best_name (vinagre_tab_get_conn (tab));
- g_string_printf (message, _("Authentication to host <i>%s</i> has failed"),
- name);
+ emphasis = g_strdup_printf ("<i>%s</i>", name);
+ /* Translators: %s is a host name or IP address. */
+ g_string_printf (message, _("Authentication to host %s has failed"),
+ emphasis);
if (msg)
g_string_append_printf (message, " (%s)", msg);
g_string_append_c (message, '.');
@@ -425,6 +430,7 @@ tab_auth_failed_cb (VinagreTab *tab, const gchar *msg, VinagreNotebook *nb)
vinagre_utils_show_error (_("Authentication failed"), message->str, GTK_WINDOW (nb->priv->window));
g_string_free (message, TRUE);
g_free (name);
+ g_free (emphasis);
vinagre_notebook_close_tab (nb, tab);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]