Add gtk_print_unix_dialog_add_custom_tab
2006-05-23 Alexander Larsson <alexl@redhat.com> * gtk/gtk.symbols: * gtk/gtkprintunixdialog.[ch]: Add gtk_print_unix_dialog_add_custom_tab * gtk/gtkprintoperation-unix.c: Implement custom widgets for unix. Fix some warnings by including cairo-ps/pdf.h * gtk/gtkprintoperation-win32.c: Mark string for translation.
This commit is contained in:

committed by
Alexander Larsson

parent
fdddcbf842
commit
07d2dd1700
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2006-05-23 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtk.symbols:
|
||||||
|
* gtk/gtkprintunixdialog.[ch]:
|
||||||
|
Add gtk_print_unix_dialog_add_custom_tab
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
Implement custom widgets for unix.
|
||||||
|
Fix some warnings by including cairo-ps/pdf.h
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Mark string for translation.
|
||||||
|
|
||||||
2006-05-22 Matthias Clasen <mclasen@redhat.com>
|
2006-05-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkprintoperation.c (gtk_print_operation_class_init):
|
* gtk/gtkprintoperation.c (gtk_print_operation_class_init):
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
2006-05-23 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtk.symbols:
|
||||||
|
* gtk/gtkprintunixdialog.[ch]:
|
||||||
|
Add gtk_print_unix_dialog_add_custom_tab
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
Implement custom widgets for unix.
|
||||||
|
Fix some warnings by including cairo-ps/pdf.h
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Mark string for translation.
|
||||||
|
|
||||||
2006-05-22 Matthias Clasen <mclasen@redhat.com>
|
2006-05-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkprintoperation.c (gtk_print_operation_class_init):
|
* gtk/gtkprintoperation.c (gtk_print_operation_class_init):
|
||||||
|
@ -2804,6 +2804,7 @@ gtk_print_unix_dialog_get_current_page
|
|||||||
gtk_print_unix_dialog_set_settings
|
gtk_print_unix_dialog_set_settings
|
||||||
gtk_print_unix_dialog_get_settings
|
gtk_print_unix_dialog_get_settings
|
||||||
gtk_print_unix_dialog_get_selected_printer
|
gtk_print_unix_dialog_get_selected_printer
|
||||||
|
gtk_print_unix_dialog_add_custom_tab
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,14 +30,18 @@
|
|||||||
#include "gtkmarshal.h"
|
#include "gtkmarshal.h"
|
||||||
#include "gtkmessagedialog.h"
|
#include "gtkmessagedialog.h"
|
||||||
|
|
||||||
|
#include <cairo-pdf.h>
|
||||||
|
#include <cairo-ps.h>
|
||||||
#include "gtkprintunixdialog.h"
|
#include "gtkprintunixdialog.h"
|
||||||
#include "gtkpagesetupunixdialog.h"
|
#include "gtkpagesetupunixdialog.h"
|
||||||
#include "gtkprintbackend.h"
|
#include "gtkprintbackend.h"
|
||||||
#include "gtkprinter.h"
|
#include "gtkprinter.h"
|
||||||
#include "gtkprintjob.h"
|
#include "gtkprintjob.h"
|
||||||
|
#include "gtklabel.h"
|
||||||
#include "gtkalias.h"
|
#include "gtkalias.h"
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GtkPrintJob *job; /* the job we are sending to the printer */
|
GtkPrintJob *job; /* the job we are sending to the printer */
|
||||||
gulong job_status_changed_tag;
|
gulong job_status_changed_tag;
|
||||||
@ -169,8 +173,9 @@ get_print_dialog (GtkPrintOperation *op,
|
|||||||
GtkWindow *parent)
|
GtkWindow *parent)
|
||||||
{
|
{
|
||||||
GtkPrintOperationPrivate *priv = op->priv;
|
GtkPrintOperationPrivate *priv = op->priv;
|
||||||
GtkWidget *pd;
|
GtkWidget *pd, *label;
|
||||||
GtkPageSetup *page_setup;
|
GtkPageSetup *page_setup;
|
||||||
|
const char *app_name;
|
||||||
|
|
||||||
pd = gtk_print_unix_dialog_new (NULL, parent);
|
pd = gtk_print_unix_dialog_new (NULL, parent);
|
||||||
|
|
||||||
@ -186,6 +191,20 @@ get_print_dialog (GtkPrintOperation *op,
|
|||||||
page_setup);
|
page_setup);
|
||||||
g_object_unref (page_setup);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
return pd;
|
return pd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +325,8 @@ handle_print_response (GtkWidget *dialog,
|
|||||||
|
|
||||||
settings = gtk_print_unix_dialog_get_settings (GTK_PRINT_UNIX_DIALOG (pd));
|
settings = gtk_print_unix_dialog_get_settings (GTK_PRINT_UNIX_DIALOG (pd));
|
||||||
page_setup = gtk_print_unix_dialog_get_page_setup (GTK_PRINT_UNIX_DIALOG (pd));
|
page_setup = gtk_print_unix_dialog_get_page_setup (GTK_PRINT_UNIX_DIALOG (pd));
|
||||||
|
|
||||||
|
g_signal_emit_by_name (rdata->op, "custom-widget-apply", rdata->op->priv->custom_widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -1377,7 +1377,7 @@ create_application_page (GtkPrintOperation *op)
|
|||||||
page.pResource = template;
|
page.pResource = template;
|
||||||
app_name = g_get_application_name ();
|
app_name = g_get_application_name ();
|
||||||
if (app_name == NULL)
|
if (app_name == NULL)
|
||||||
app_name = "Application";
|
app_name = _("Application");
|
||||||
page.pszTitle = g_utf8_to_utf16 (app_name,
|
page.pszTitle = g_utf8_to_utf16 (app_name,
|
||||||
-1, NULL, NULL, NULL);
|
-1, NULL, NULL, NULL);
|
||||||
page.pfnDlgProc = pageDlgProc;
|
page.pfnDlgProc = pageDlgProc;
|
||||||
|
@ -2637,6 +2637,17 @@ gtk_print_unix_dialog_get_settings (GtkPrintUnixDialog *dialog)
|
|||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gtk_print_unix_dialog_add_custom_tab (GtkPrintUnixDialog *dialog,
|
||||||
|
GtkWidget *child,
|
||||||
|
GtkWidget *tab_label)
|
||||||
|
{
|
||||||
|
gtk_notebook_insert_page (GTK_NOTEBOOK (dialog->priv->notebook),
|
||||||
|
child, tab_label, 2);
|
||||||
|
gtk_widget_show (child);
|
||||||
|
gtk_widget_show (tab_label);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define __GTK_PRINT_UNIX_DIALOG_C__
|
#define __GTK_PRINT_UNIX_DIALOG_C__
|
||||||
#include "gtkaliasdef.c"
|
#include "gtkaliasdef.c"
|
||||||
|
@ -74,7 +74,9 @@ void gtk_print_unix_dialog_set_settings (GtkPrintUnixDialog
|
|||||||
GtkPrintSettings *settings);
|
GtkPrintSettings *settings);
|
||||||
GtkPrintSettings *gtk_print_unix_dialog_get_settings (GtkPrintUnixDialog *dialog);
|
GtkPrintSettings *gtk_print_unix_dialog_get_settings (GtkPrintUnixDialog *dialog);
|
||||||
GtkPrinter * gtk_print_unix_dialog_get_selected_printer (GtkPrintUnixDialog *dialog);
|
GtkPrinter * gtk_print_unix_dialog_get_selected_printer (GtkPrintUnixDialog *dialog);
|
||||||
|
void gtk_print_unix_dialog_add_custom_tab (GtkPrintUnixDialog *dialog,
|
||||||
|
GtkWidget *child,
|
||||||
|
GtkWidget *tab_label);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user