diff options
author | Alexander Larsson <alexl@redhat.com> | 2006-05-12 09:47:58 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2006-05-12 09:47:58 +0000 |
commit | c459feaab114cecd04266050375badb7b58735c7 (patch) | |
tree | b6f0c5f24be1495685977f8ea707468169b1d167 | |
parent | dc918cbf7594de9c5f23ddb1bae253b4a6b8cd74 (diff) | |
download | gtk+-c459feaab114cecd04266050375badb7b58735c7.tar.gz |
Fix build errors.
2006-05-12 Alexander Larsson <alexl@redhat.com>
* gtk/gtkrecentmanager.c:
Fix build errors.
* gtk/gtk.symbols:
* demos/gtk-demo/printing.c:
* gtk/gtkprintoperation-win32.c:
* gtk/gtkprintoperation.[ch]:
* gtk/gtkprintsettings.[ch]:
* modules/printbackends/cups/gtkprintbackendcups.c:
* modules/printbackends/lpr/gtkprintbackendlpr.c:
* modules/printbackends/pdf/gtkprintbackendpdf.c:
* tests/print-editor.c:
* tests/testnouiprint.c:
* tests/testprint.c:
* tests/testprintfileoperation.c:
Rename functions from nr_of_pages to n_pages, and num_copies to
n_copies to match other gtk+ names.
* gtk/gtkmenu.c: (gtk_menu_popdown):
Only re-set window group on popdown if we set it on popup (i.e.
if there is a parent menu shell).
Fixed part of bug #340401
* gtk/gtkwindow.c:
Add (contruct) property "transient-for" to GtkWindow. This
is needed for the fix to bug #340401.
* gtk/gtkprintunixdialog.c:
Use the transient-for property on construction and populate the dialog
with widgets after that. This fixes bug #340401.
More n_pages renames.
-rw-r--r-- | ChangeLog | 34 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 34 | ||||
-rw-r--r-- | demos/gtk-demo/printing.c | 2 | ||||
-rw-r--r-- | gtk/gtk.symbols | 6 | ||||
-rw-r--r-- | gtk/gtkmenu.c | 7 | ||||
-rw-r--r-- | gtk/gtkprintoperation-win32.c | 8 | ||||
-rw-r--r-- | gtk/gtkprintoperation.c | 22 | ||||
-rw-r--r-- | gtk/gtkprintoperation.h | 2 | ||||
-rw-r--r-- | gtk/gtkprintsettings.c | 18 | ||||
-rw-r--r-- | gtk/gtkprintsettings.h | 6 | ||||
-rw-r--r-- | gtk/gtkprintunixdialog.c | 44 | ||||
-rw-r--r-- | gtk/gtkrecentmanager.c | 7 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 25 | ||||
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 4 | ||||
-rw-r--r-- | modules/printbackends/lpr/gtkprintbackendlpr.c | 2 | ||||
-rw-r--r-- | modules/printbackends/pdf/gtkprintbackendpdf.c | 2 | ||||
-rw-r--r-- | tests/print-editor.c | 2 | ||||
-rw-r--r-- | tests/testnouiprint.c | 2 | ||||
-rw-r--r-- | tests/testprint.c | 2 | ||||
-rw-r--r-- | tests/testprintfileoperation.c | 2 |
20 files changed, 174 insertions, 57 deletions
@@ -1,3 +1,37 @@ +2006-05-12 Alexander Larsson <alexl@redhat.com> + + * gtk/gtkrecentmanager.c: + Fix build errors. + + * gtk/gtk.symbols: + * demos/gtk-demo/printing.c: + * gtk/gtkprintoperation-win32.c: + * gtk/gtkprintoperation.[ch]: + * gtk/gtkprintsettings.[ch]: + * modules/printbackends/cups/gtkprintbackendcups.c: + * modules/printbackends/lpr/gtkprintbackendlpr.c: + * modules/printbackends/pdf/gtkprintbackendpdf.c: + * tests/print-editor.c: + * tests/testnouiprint.c: + * tests/testprint.c: + * tests/testprintfileoperation.c: + Rename functions from nr_of_pages to n_pages, and num_copies to + n_copies to match other gtk+ names. + + * gtk/gtkmenu.c: (gtk_menu_popdown): + Only re-set window group on popdown if we set it on popup (i.e. + if there is a parent menu shell). + Fixed part of bug #340401 + + * gtk/gtkwindow.c: + Add (contruct) property "transient-for" to GtkWindow. This + is needed for the fix to bug #340401. + + * gtk/gtkprintunixdialog.c: + Use the transient-for property on construction and populate the dialog + with widgets after that. This fixes bug #340401. + More n_pages renames. + 2006-05-11 Emmanuele Bassi <ebassi@cvs.gnome.org> * gtk/gtkrecentmanager.h: Remove the error parameter to the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 41a0dd869d..426638540f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,37 @@ +2006-05-12 Alexander Larsson <alexl@redhat.com> + + * gtk/gtkrecentmanager.c: + Fix build errors. + + * gtk/gtk.symbols: + * demos/gtk-demo/printing.c: + * gtk/gtkprintoperation-win32.c: + * gtk/gtkprintoperation.[ch]: + * gtk/gtkprintsettings.[ch]: + * modules/printbackends/cups/gtkprintbackendcups.c: + * modules/printbackends/lpr/gtkprintbackendlpr.c: + * modules/printbackends/pdf/gtkprintbackendpdf.c: + * tests/print-editor.c: + * tests/testnouiprint.c: + * tests/testprint.c: + * tests/testprintfileoperation.c: + Rename functions from nr_of_pages to n_pages, and num_copies to + n_copies to match other gtk+ names. + + * gtk/gtkmenu.c: (gtk_menu_popdown): + Only re-set window group on popdown if we set it on popup (i.e. + if there is a parent menu shell). + Fixed part of bug #340401 + + * gtk/gtkwindow.c: + Add (contruct) property "transient-for" to GtkWindow. This + is needed for the fix to bug #340401. + + * gtk/gtkprintunixdialog.c: + Use the transient-for property on construction and populate the dialog + with widgets after that. This fixes bug #340401. + More n_pages renames. + 2006-05-11 Emmanuele Bassi <ebassi@cvs.gnome.org> * gtk/gtkrecentmanager.h: Remove the error parameter to the diff --git a/demos/gtk-demo/printing.c b/demos/gtk-demo/printing.c index 9940d3351b..4ddeeaa148 100644 --- a/demos/gtk-demo/printing.c +++ b/demos/gtk-demo/printing.c @@ -49,7 +49,7 @@ begin_print (GtkPrintOperation *operation, data->num_lines = i; data->num_pages = (data->num_lines - 1) / data->lines_per_page + 1; - gtk_print_operation_set_nr_of_pages (operation, data->num_pages); + gtk_print_operation_set_n_pages (operation, data->num_pages); } static void diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index 19f8c59d40..2afc6788fb 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -2688,7 +2688,7 @@ gtk_print_operation_get_default_page_setup gtk_print_operation_set_print_settings gtk_print_operation_get_print_settings gtk_print_operation_set_job_name -gtk_print_operation_set_nr_of_pages +gtk_print_operation_set_n_pages gtk_print_operation_set_current_page gtk_print_operation_set_use_full_page gtk_print_operation_set_unit @@ -2760,8 +2760,8 @@ gtk_print_settings_get_duplex gtk_print_settings_set_duplex gtk_print_settings_get_quality gtk_print_settings_set_quality -gtk_print_settings_get_num_copies -gtk_print_settings_set_num_copies +gtk_print_settings_get_n_copies +gtk_print_settings_set_n_copies gtk_print_settings_get_number_up gtk_print_settings_set_number_up gtk_print_settings_get_resolution diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 446592eda7..64b85b38b2 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -1473,12 +1473,14 @@ gtk_menu_popdown (GtkMenu *menu) { GtkMenuPrivate *private; GtkMenuShell *menu_shell; + gboolean had_parent; g_return_if_fail (GTK_IS_MENU (menu)); menu_shell = GTK_MENU_SHELL (menu); private = gtk_menu_get_private (menu); - + + had_parent = menu_shell->parent_menu_shell != NULL; menu_shell->parent_menu_shell = NULL; menu_shell->active = FALSE; menu_shell->ignore_enter = FALSE; @@ -1502,7 +1504,8 @@ gtk_menu_popdown (GtkMenu *menu) /* The X Grab, if present, will automatically be removed when we hide * the window */ gtk_widget_hide (menu->toplevel); - gtk_window_group_add_window (gtk_window_get_group (NULL), GTK_WINDOW (menu->toplevel)); + if (had_parent) + gtk_window_group_add_window (gtk_window_get_group (NULL), GTK_WINDOW (menu->toplevel)); if (menu->torn_off) { diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index 079ae1f229..6b6ad5b627 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -660,8 +660,8 @@ devmode_to_settings (GtkPrintSettings *settings, devmode->dmScale / 100.0); if (devmode->dmFields & DM_COPIES) - gtk_print_settings_set_num_copies (settings, - devmode->dmCopies); + gtk_print_settings_set_n_copies (settings, + devmode->dmCopies); if (devmode->dmFields & DM_DEFAULTSOURCE) { @@ -941,10 +941,10 @@ devmode_from_settings (GtkPrintSettings *settings, devmode->dmScale = gtk_print_settings_get_scale (settings) * 100; } - if (gtk_print_settings_has_key (settings, GTK_PRINT_SETTINGS_NUM_COPIES)) + if (gtk_print_settings_has_key (settings, GTK_PRINT_SETTINGS_N_COPIES)) { devmode->dmFields |= DM_COPIES; - devmode->dmCopies = gtk_print_settings_get_num_copies (settings); + devmode->dmCopies = gtk_print_settings_get_n_copies (settings); } if (gtk_print_settings_has_key (settings, "win32-default-source")) diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 26397dda9c..4114a91474 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -43,7 +43,7 @@ enum { PROP_DEFAULT_PAGE_SETUP, PROP_PRINT_SETTINGS, PROP_JOB_NAME, - PROP_NR_OF_PAGES, + PROP_N_PAGES, PROP_CURRENT_PAGE, PROP_USE_FULL_PAGE, PROP_UNIT, @@ -144,8 +144,8 @@ gtk_print_operation_set_property (GObject *object, case PROP_JOB_NAME: gtk_print_operation_set_job_name (op, g_value_get_string (value)); break; - case PROP_NR_OF_PAGES: - gtk_print_operation_set_nr_of_pages (op, g_value_get_int (value)); + case PROP_N_PAGES: + gtk_print_operation_set_n_pages (op, g_value_get_int (value)); break; case PROP_CURRENT_PAGE: gtk_print_operation_set_current_page (op, g_value_get_int (value)); @@ -188,7 +188,7 @@ gtk_print_operation_get_property (GObject *object, case PROP_JOB_NAME: g_value_set_string (value, priv->job_name); break; - case PROP_NR_OF_PAGES: + case PROP_N_PAGES: g_value_set_int (value, priv->nr_of_pages); break; case PROP_CURRENT_PAGE: @@ -239,7 +239,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * * A typical use for this signal is to use the parameters from the * #GtkPrintContext and paginate the document accordingly, and then - * set the number of pages with gtk_print_operation_set_nr_of_pages(). + * set the number of pages with gtk_print_operation_set_n_pages(). * * Since: 2.10 */ @@ -405,7 +405,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) GTK_PARAM_READWRITE)); /** - * GtkPrintOperation:number-of-pages: + * GtkPrintOperation:n-pages: * * The number of pages in the document. * @@ -419,8 +419,8 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * Since: 2.10 */ g_object_class_install_property (gobject_class, - PROP_NR_OF_PAGES, - g_param_spec_int ("number-of-pages", + PROP_N_PAGES, + g_param_spec_int ("n-pages", P_("Number of Pages"), P_("The number of pages in the document."), -1, @@ -734,7 +734,7 @@ gtk_print_operation_set_job_name (GtkPrintOperation *op, } /** - * gtk_print_operation_set_nr_of_pages: + * gtk_print_operation_set_n_pages: * @op: a #GtkPrintOperation * @n_pages: the number of pages * @@ -752,8 +752,8 @@ gtk_print_operation_set_job_name (GtkPrintOperation *op, * Since: 2.10 **/ void -gtk_print_operation_set_nr_of_pages (GtkPrintOperation *op, - gint n_pages) +gtk_print_operation_set_n_pages (GtkPrintOperation *op, + gint n_pages) { GtkPrintOperationPrivate *priv; diff --git a/gtk/gtkprintoperation.h b/gtk/gtkprintoperation.h index 01a7fa59b7..b86f9869c8 100644 --- a/gtk/gtkprintoperation.h +++ b/gtk/gtkprintoperation.h @@ -116,7 +116,7 @@ void gtk_print_operation_set_print_settings (GtkPrintOper GtkPrintSettings * gtk_print_operation_get_print_settings (GtkPrintOperation *op); void gtk_print_operation_set_job_name (GtkPrintOperation *op, const gchar *job_name); -void gtk_print_operation_set_nr_of_pages (GtkPrintOperation *op, +void gtk_print_operation_set_n_pages (GtkPrintOperation *op, gint n_pages); void gtk_print_operation_set_current_page (GtkPrintOperation *op, gint current_page); diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c index 2cac68f2f5..f0540f17e0 100644 --- a/gtk/gtkprintsettings.c +++ b/gtk/gtkprintsettings.c @@ -1037,35 +1037,35 @@ gtk_print_settings_set_page_set (GtkPrintSettings *settings, } /** - * gtk_print_settings_get_num_copies: + * gtk_print_settings_get_n_copies: * @settings: a #GtkPrintSettings * - * Gets the value of %GTK_PRINT_SETTINGS_NUM_COPIES. + * Gets the value of %GTK_PRINT_SETTINGS_N_COPIES. * * Return value: the number of copies to print * * Since: 2.10 */ gint -gtk_print_settings_get_num_copies (GtkPrintSettings *settings) +gtk_print_settings_get_n_copies (GtkPrintSettings *settings) { - return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_NUM_COPIES, 1); + return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_N_COPIES, 1); } /** - * gtk_print_settings_set_num_copies: + * gtk_print_settings_set_n_copies: * @settings: a #GtkPrintSettings * @num_copies: the number of copies * - * Sets the value of %GTK_PRINT_SETTINGS_NUM_COPIES. + * Sets the value of %GTK_PRINT_SETTINGS_N_COPIES. * * Since: 2.10 */ void -gtk_print_settings_set_num_copies (GtkPrintSettings *settings, - gint num_copies) +gtk_print_settings_set_n_copies (GtkPrintSettings *settings, + gint num_copies) { - gtk_print_settings_set_int (settings, GTK_PRINT_SETTINGS_NUM_COPIES, + gtk_print_settings_set_int (settings, GTK_PRINT_SETTINGS_N_COPIES, num_copies); } diff --git a/gtk/gtkprintsettings.h b/gtk/gtkprintsettings.h index 5254434878..2c53c70268 100644 --- a/gtk/gtkprintsettings.h +++ b/gtk/gtkprintsettings.h @@ -92,7 +92,7 @@ void gtk_print_settings_set_int (GtkPrintSettings #define GTK_PRINT_SETTINGS_PAPER_FORMAT "paper-format" #define GTK_PRINT_SETTINGS_PAPER_WIDTH "paper-width" #define GTK_PRINT_SETTINGS_PAPER_HEIGHT "paper-height" -#define GTK_PRINT_SETTINGS_NUM_COPIES "num-copies" +#define GTK_PRINT_SETTINGS_N_COPIES "n-copies" #define GTK_PRINT_SETTINGS_DEFAULT_SOURCE "default-source" #define GTK_PRINT_SETTINGS_QUALITY "quality" #define GTK_PRINT_SETTINGS_RESOLUTION "resolution" @@ -150,8 +150,8 @@ void gtk_print_settings_set_duplex (GtkPrintSettings *se GtkPrintQuality gtk_print_settings_get_quality (GtkPrintSettings *settings); void gtk_print_settings_set_quality (GtkPrintSettings *settings, GtkPrintQuality quality); -gint gtk_print_settings_get_num_copies (GtkPrintSettings *settings); -void gtk_print_settings_set_num_copies (GtkPrintSettings *settings, +gint gtk_print_settings_get_n_copies (GtkPrintSettings *settings); +void gtk_print_settings_set_n_copies (GtkPrintSettings *settings, gint num_copies); gint gtk_print_settings_get_number_up (GtkPrintSettings *settings); void gtk_print_settings_set_number_up (GtkPrintSettings *settings, diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 5ee1fdba82..f933da7f1a 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -58,6 +58,9 @@ static void gtk_print_unix_dialog_destroy (GtkPrintUnixDialog *dialog); static void gtk_print_unix_dialog_finalize (GObject *object); +static GObject* gtk_print_unix_dialog_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_params); static void gtk_print_unix_dialog_set_property (GObject *object, guint prop_id, const GValue *value, @@ -206,6 +209,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class) widget_class = (GtkWidgetClass *) class; object_class->finalize = gtk_print_unix_dialog_finalize; + object_class->constructor = gtk_print_unix_dialog_constructor; object_class->set_property = gtk_print_unix_dialog_set_property; object_class->get_property = gtk_print_unix_dialog_get_property; @@ -245,6 +249,7 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class) GTK_TYPE_PRINTER, GTK_PARAM_READABLE)); + g_type_class_add_private (class, sizeof (GtkPrintUnixDialogPrivate)); } @@ -262,8 +267,6 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog) priv->page_setup = gtk_page_setup_new (); - populate_dialog (dialog); - g_signal_connect (dialog, "destroy", (GCallback) gtk_print_unix_dialog_destroy, @@ -278,6 +281,29 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog) gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE); } +static GObject * +gtk_print_unix_dialog_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_params) +{ + GtkPrintUnixDialog *dialog; + GObject *object; + + object = + G_OBJECT_CLASS (gtk_print_unix_dialog_parent_class)->constructor (type, + n_construct_properties, + construct_params); + + /* We need to populate the dialog after the transient-to has been set. + * See bug #340401. + */ + dialog = GTK_PRINT_UNIX_DIALOG (object); + populate_dialog (dialog); + + return object; +} + + static void gtk_print_unix_dialog_destroy (GtkPrintUnixDialog *dialog) { @@ -2334,15 +2360,13 @@ gtk_print_unix_dialog_new (const gchar *title, if (title) _title = title; - + result = g_object_new (GTK_TYPE_PRINT_UNIX_DIALOG, + "transient-for", parent, "title", _title, "has-separator", FALSE, NULL); - - if (parent) - gtk_window_set_transient_for (GTK_WINDOW (result), parent); - + return result; } @@ -2534,7 +2558,7 @@ gtk_print_unix_dialog_set_settings (GtkPrintUnixDialog *dialog, { dialog_set_collate (dialog, gtk_print_settings_get_collate (settings)); dialog_set_reverse (dialog, gtk_print_settings_get_reverse (settings)); - dialog_set_n_copies (dialog, gtk_print_settings_get_num_copies (settings)); + dialog_set_n_copies (dialog, gtk_print_settings_get_n_copies (settings)); dialog_set_scale (dialog, gtk_print_settings_get_scale (settings)); dialog_set_page_set (dialog, gtk_print_settings_get_page_set (settings)); dialog_set_print_pages (dialog, gtk_print_settings_get_print_pages (settings)); @@ -2610,8 +2634,8 @@ gtk_print_unix_dialog_get_settings (GtkPrintUnixDialog *dialog) gtk_print_settings_set_reverse (settings, dialog_get_reverse (dialog)); - gtk_print_settings_set_num_copies (settings, - dialog_get_n_copies (dialog)); + gtk_print_settings_set_n_copies (settings, + dialog_get_n_copies (dialog)); gtk_print_settings_set_scale (settings, dialog_get_scale (dialog)); diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index 371db0ff7a..54110ec80c 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -830,7 +830,7 @@ gtk_recent_manager_get_limit (GtkRecentManager *manager) */ gboolean gtk_recent_manager_add_item (GtkRecentManager *manager, - const gchar *uri); + const gchar *uri) { GtkRecentData *recent_data; GError *add_error; @@ -916,8 +916,7 @@ gtk_recent_manager_add_item (GtkRecentManager *manager, gboolean gtk_recent_manager_add_full (GtkRecentManager *manager, const gchar *uri, - const GtkRecentData *data, - GError **error) + const GtkRecentData *data) { GtkRecentManagerPrivate *priv; @@ -959,7 +958,7 @@ gtk_recent_manager_add_full (GtkRecentManager *manager, { g_warning ("Attempting to add `%s' to the list of recently used " "resources, but no name of the application that is " - "registering it was defined" + "registering it was defined", uri); return FALSE; } diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 51d569ae5b..98313a8b3b 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -89,6 +89,7 @@ enum { PROP_DECORATED, PROP_DELETABLE, PROP_GRAVITY, + PROP_TRANSIENT_FOR, /* Readonly properties */ PROP_IS_ACTIVE, @@ -657,6 +658,23 @@ gtk_window_class_init (GtkWindowClass *klass) GDK_GRAVITY_NORTH_WEST, GTK_PARAM_READWRITE)); + + /** + * GtkWindow:transient-for: + * + * The transient parent of the window. See gtk_window_set_transient_for() for + * more details about transient windows. + * + * Since: 2.10 + */ + g_object_class_install_property (gobject_class, + PROP_TRANSIENT_FOR, + g_param_spec_object ("transient-for", + P_("Transient for Window"), + P_("The transient parent of the dialog"), + GTK_TYPE_WINDOW, + GTK_PARAM_READWRITE| G_PARAM_CONSTRUCT)); + window_signals[SET_FOCUS] = g_signal_new (I_("set_focus"), G_TYPE_FROM_CLASS (gobject_class), @@ -903,6 +921,9 @@ gtk_window_set_property (GObject *object, case PROP_GRAVITY: gtk_window_set_gravity (window, g_value_get_enum (value)); break; + case PROP_TRANSIENT_FOR: + gtk_window_set_transient_for (window, g_value_get_object (value)); + break; default: break; } @@ -1011,6 +1032,9 @@ gtk_window_get_property (GObject *object, case PROP_GRAVITY: g_value_set_enum (value, gtk_window_get_gravity (window)); break; + case PROP_TRANSIENT_FOR: + g_value_set_object (value, gtk_window_get_transient_for (window)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1878,7 +1902,6 @@ gtk_window_set_transient_for (GtkWindow *window, g_return_if_fail (parent == NULL || GTK_IS_WINDOW (parent)); g_return_if_fail (window != parent); - if (window->transient_parent) { if (GTK_WIDGET_REALIZED (window) && diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index ed4d95a7ac..3380d8970d 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -2483,9 +2483,9 @@ cups_printer_prepare_for_print (GtkPrinter *printer, gtk_print_settings_set (settings, "cups-OutputOrder", "Reverse"); print_job->reverse = FALSE; - if (gtk_print_settings_get_num_copies (settings) > 1) + if (gtk_print_settings_get_n_copies (settings) > 1) gtk_print_settings_set_int (settings, "cups-copies", - gtk_print_settings_get_num_copies (settings)); + gtk_print_settings_get_n_copies (settings)); print_job->num_copies = 1; scale = gtk_print_settings_get_scale (settings); diff --git a/modules/printbackends/lpr/gtkprintbackendlpr.c b/modules/printbackends/lpr/gtkprintbackendlpr.c index 5bb8276626..d1391340dc 100644 --- a/modules/printbackends/lpr/gtkprintbackendlpr.c +++ b/modules/printbackends/lpr/gtkprintbackendlpr.c @@ -468,7 +468,7 @@ lpr_printer_prepare_for_print (GtkPrinter *printer, print_job->collate = gtk_print_settings_get_collate (settings); print_job->reverse = gtk_print_settings_get_reverse (settings); - print_job->num_copies = gtk_print_settings_get_num_copies (settings); + print_job->num_copies = gtk_print_settings_get_n_copies (settings); scale = gtk_print_settings_get_scale (settings); if (scale != 100.0) diff --git a/modules/printbackends/pdf/gtkprintbackendpdf.c b/modules/printbackends/pdf/gtkprintbackendpdf.c index 746f1d2700..cfc7932fe3 100644 --- a/modules/printbackends/pdf/gtkprintbackendpdf.c +++ b/modules/printbackends/pdf/gtkprintbackendpdf.c @@ -438,7 +438,7 @@ pdf_printer_prepare_for_print (GtkPrinter *printer, print_job->collate = gtk_print_settings_get_collate (settings); print_job->reverse = gtk_print_settings_get_reverse (settings); - print_job->num_copies = gtk_print_settings_get_num_copies (settings); + print_job->num_copies = gtk_print_settings_get_n_copies (settings); scale = gtk_print_settings_get_scale (settings); if (scale != 100.0) diff --git a/tests/print-editor.c b/tests/print-editor.c index 7b78ac5a2d..4636d85616 100644 --- a/tests/print-editor.c +++ b/tests/print-editor.c @@ -298,7 +298,7 @@ begin_print (GtkPrintOperation *operation, } page_breaks = g_list_reverse (page_breaks); - gtk_print_operation_set_nr_of_pages (operation, g_list_length (page_breaks) + 1); + gtk_print_operation_set_n_pages (operation, g_list_length (page_breaks) + 1); print_data->page_breaks = page_breaks; diff --git a/tests/testnouiprint.c b/tests/testnouiprint.c index 3b0825b2ab..c640063b20 100644 --- a/tests/testnouiprint.c +++ b/tests/testnouiprint.c @@ -97,7 +97,7 @@ main (int argc, char **argv) print = gtk_print_operation_new (); gtk_print_operation_set_print_settings (print, settings); - gtk_print_operation_set_nr_of_pages (print, 1); + gtk_print_operation_set_n_pages (print, 1); gtk_print_operation_set_unit (print, GTK_UNIT_MM); gtk_print_operation_set_show_dialog (print, FALSE); g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL); diff --git a/tests/testprint.c b/tests/testprint.c index 4294fd02f3..4326a8062d 100644 --- a/tests/testprint.c +++ b/tests/testprint.c @@ -106,7 +106,7 @@ main (int argc, char **argv) /* Test some random drawing, with per-page paper settings */ print = gtk_print_operation_new (); - gtk_print_operation_set_nr_of_pages (print, 2); + gtk_print_operation_set_n_pages (print, 2); gtk_print_operation_set_unit (print, GTK_UNIT_MM); gtk_print_operation_set_pdf_target (print, "test.pdf"); g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL); diff --git a/tests/testprintfileoperation.c b/tests/testprintfileoperation.c index e1c4b5a7d8..e511eb3b69 100644 --- a/tests/testprintfileoperation.c +++ b/tests/testprintfileoperation.c @@ -70,7 +70,7 @@ test_print_file_operation_begin_print (GtkPrintOperation *operation, GtkPrintCon op->num_lines = i; op->num_pages = (op->num_lines - 1) / op->lines_per_page + 1; - gtk_print_operation_set_nr_of_pages (operation, op->num_pages); + gtk_print_operation_set_n_pages (operation, op->num_pages); } static void |