dlg = gl_hig_dialog_new_with_buttons (_("New Label or Card"),
window,
- GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK, GTK_RESPONSE_OK,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
NULL);
GtkFileSelection *fsel;
gboolean saved_flag = FALSE;
gboolean destroy_flag = FALSE;
+ gchar *name, *title;
gl_debug (DEBUG_FILE, "START");
- g_return_val_if_fail (label != NULL, FALSE);
- g_return_val_if_fail (window != NULL, FALSE);
+ g_return_val_if_fail (label && GL_IS_LABEL(label), FALSE);
+ g_return_val_if_fail (window && GTK_IS_WINDOW(window), FALSE);
+ name = gl_label_get_short_name (label);
+ title = g_strdup_printf (_("Save \"%s\" as"), name);
+ g_free (name);
- fsel = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save label as")));
+ fsel = GTK_FILE_SELECTION (gtk_file_selection_new (title));
gtk_window_set_modal (GTK_WINDOW (fsel), TRUE);
gtk_window_set_transient_for (GTK_WINDOW (fsel), window);
gtk_widget_destroy (GTK_WIDGET (fsel));
}
+ g_free (title);
+
gl_debug (DEBUG_FILE, "END");
/* Return flag as set by one of the above callbacks, TRUE = saved */
{
GtkWidget *dlg;
GtkWidget *pp_button, *notebook, *page;
+ gchar *name, *title;
- g_return_if_fail (label != NULL);
- g_return_if_fail (win != NULL);
+ g_return_if_fail (label && GL_IS_LABEL(label));
+ g_return_if_fail (win && BONOBO_IS_WINDOW(win));
+
+ name = gl_label_get_short_name (label);
+ title = g_strdup_printf ("%s \"%s\"", _("Print"), name);
+ g_free (name);
/* ----- Contstruct basic print dialog with notebook ----- */
- dlg = gl_hig_dialog_new_with_buttons (_("Print"), GTK_WINDOW(win),
+ dlg = gl_hig_dialog_new_with_buttons (title, GTK_WINDOW(win),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_PRINT, GNOME_PRINT_DIALOG_RESPONSE_PRINT,
G_CALLBACK (print_response), label);
gtk_widget_show_all (GTK_WIDGET (dlg));
+
+ g_free (title);
}
/*---------------------------------------------------------------------------*/