[gtk+/open-with-dialog: 46/52] open-with-diaolog: set the default text according to the dialog mode
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/open-with-dialog: 46/52] open-with-diaolog: set the default text according to the dialog mode
- Date: Tue, 23 Nov 2010 15:58:58 +0000 (UTC)
commit 04eb875e86094e6ca6909d86cb3a867b66110b24
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Nov 23 12:47:16 2010 +0100
open-with-diaolog: set the default text according to the dialog mode
gtk/gtkopenwithdialog.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkopenwithdialog.c b/gtk/gtkopenwithdialog.c
index fd0aca9..1b66152 100644
--- a/gtk/gtkopenwithdialog.c
+++ b/gtk/gtkopenwithdialog.c
@@ -224,7 +224,7 @@ get_extension (const char *basename)
static void
set_dialog_properties (GtkOpenWithDialog *self)
{
- char *label, *name, *extension, *description;
+ char *label, *name, *extension, *description, *default_text, *string;
PangoFontDescription *font_desc;
name = NULL;
@@ -245,6 +245,8 @@ set_dialog_properties (GtkOpenWithDialog *self)
{
/* Translators: %s is a filename */
label = g_strdup_printf (_("Select an application to open \"%s\""), name);
+ string = g_strdup_printf (_("No applications available to open \"%s\""),
+ name);
}
else
{
@@ -252,6 +254,9 @@ set_dialog_properties (GtkOpenWithDialog *self)
label = g_strdup_printf (_("Select an application for \"%s\" files"),
g_content_type_is_unknown (self->priv->content_type) ?
self->priv->content_type : description);
+ string = g_strdup_printf (_("No applications available to open \"%s\" files"),
+ g_content_type_is_unknown (self->priv->content_type) ?
+ self->priv->content_type : description);
}
font_desc = pango_font_description_new ();
@@ -261,10 +266,20 @@ set_dialog_properties (GtkOpenWithDialog *self)
gtk_label_set_markup (GTK_LABEL (self->priv->label), label);
+ default_text = g_strdup_printf ("<big><b>%s</b></big>\n%s",
+ string,
+ _("Click \"Show other applications\", for more options, or "
+ "\"Find applications online\" to install a new application"));
+
+ gtk_open_with_widget_set_default_text (GTK_OPEN_WITH_WIDGET (self->priv->open_with_widget),
+ default_text);
+
g_free (label);
g_free (name);
g_free (extension);
g_free (description);
+ g_free (string);
+ g_free (default_text);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]