diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-24 16:15:15 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-24 16:15:15 +0000 |
commit | 7f6f61c9ff37178209b4c9a433b2421fc0180305 (patch) | |
tree | f0ac0dad81a0e764fa3f5c6dd5235e1e441e3b6c /gtk/gtkprintoperation-unix.c | |
parent | 70376f280a6735551404ad583eb9efd8afcc7cc3 (diff) | |
download | gtk+-7f6f61c9ff37178209b4c9a433b2421fc0180305.tar.gz |
Custom tab label
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r-- | gtk/gtkprintoperation-unix.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 77e98c4118..33354df60d 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -179,7 +179,7 @@ get_print_dialog (GtkPrintOperation *op, GtkPrintOperationPrivate *priv = op->priv; GtkWidget *pd, *label; GtkPageSetup *page_setup; - const char *app_name; + const gchar *custom_tab_label; pd = gtk_print_unix_dialog_new (NULL, parent); @@ -203,18 +203,24 @@ get_print_dialog (GtkPrintOperation *op, g_object_unref (page_setup); g_signal_emit_by_name (op, "create-custom-widget", - &op->priv->custom_widget); - - if (op->priv->custom_widget) { - app_name = g_get_application_name (); - if (app_name == NULL) - app_name = _("Application"); - - label = gtk_label_new (app_name); - - gtk_print_unix_dialog_add_custom_tab (GTK_PRINT_UNIX_DIALOG (pd), - op->priv->custom_widget, label); - } + &priv->custom_widget); + + if (priv->custom_widget) + { + custom_tab_label = priv->custom_tab_label; + + if (custom_tab_label == NULL) + { + custom_tab_label = g_get_application_name (); + if (custom_tab_label == NULL) + custom_tab_label = _("Application"); + } + + label = gtk_label_new (custom_tab_label); + + gtk_print_unix_dialog_add_custom_tab (GTK_PRINT_UNIX_DIALOG (pd), + op->priv->custom_widget, label); + } return pd; } |