Compare commits
1 Commits
use-gles3-
...
deprecate-
Author | SHA1 | Date | |
---|---|---|---|
|
6f46e95c75 |
@@ -8,6 +8,8 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWidget *entry1 = NULL;
|
||||
static GtkWidget *entry2 = NULL;
|
||||
|
@@ -35,6 +35,7 @@ do_spinner (GtkWidget *do_widget)
|
||||
|
||||
if (!window)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
window = gtk_dialog_new_with_buttons ("Spinner",
|
||||
GTK_WINDOW (do_widget),
|
||||
0,
|
||||
@@ -48,6 +49,7 @@ do_spinner (GtkWidget *do_widget)
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_widget_set_margin_start (vbox, 5);
|
||||
|
@@ -578,7 +578,10 @@ show_open_filechooser (NodeEditorWindow *self)
|
||||
"_Load", GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
|
||||
GFile *cwd = g_file_new_for_path (".");
|
||||
@@ -654,7 +657,10 @@ save_cb (GtkWidget *button,
|
||||
"_Save", GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
|
||||
GFile *cwd = g_file_new_for_path (".");
|
||||
@@ -773,7 +779,10 @@ export_image_cb (GtkWidget *button,
|
||||
"_Save", GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (export_image_response_cb), texture);
|
||||
gtk_widget_show (dialog);
|
||||
|
@@ -525,7 +525,9 @@ activate_save_as (GSimpleAction *action,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Save", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
@@ -572,7 +574,9 @@ activate_open (GSimpleAction *action,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Open", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
|
@@ -1462,7 +1462,10 @@ close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv)
|
||||
if (response == GTK_RESPONSE_CANCEL)
|
||||
return;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
box = gtk_widget_get_first_child (gtk_dialog_get_content_area (GTK_DIALOG (dialog)));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
g_assert (GTK_IS_FLOW_BOX (box));
|
||||
children = gtk_flow_box_get_selected_children (GTK_FLOW_BOX (box));
|
||||
|
||||
|
@@ -349,6 +349,8 @@ quit_activated (GSimpleAction *action,
|
||||
g_application_quit (app);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
static void
|
||||
combo_changed (GtkDropDown *combo,
|
||||
GParamSpec *pspec,
|
||||
@@ -466,6 +468,8 @@ edit_accels (GSimpleAction *action,
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
static gboolean
|
||||
update_time (gpointer user_data)
|
||||
{
|
||||
|
@@ -65,7 +65,7 @@
|
||||
#include "gtkcellrenderertext.h"
|
||||
#include "gtkcombobox.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtkdialog.h"
|
||||
#include "deprecated/gtkdialog.h"
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkliststore.h"
|
||||
|
@@ -57,7 +57,7 @@
|
||||
#include "gtkentry.h"
|
||||
#include "gtktogglebutton.h"
|
||||
#include "gtkheaderbar.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include "gtksearchbar.h"
|
||||
#include "gtksizegroup.h"
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/deprecated/gtkdialog.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@@ -28,8 +28,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "gtkbutton.h"
|
||||
#include "gtkdialog.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialog.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include "gtkheaderbar.h"
|
||||
#include "gtkheaderbarprivate.h"
|
||||
#include "gtklabel.h"
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtksizegroup.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkDialog:
|
||||
*
|
||||
@@ -688,6 +690,8 @@ gtk_dialog_close (GtkDialog *dialog)
|
||||
* as described above.
|
||||
*
|
||||
* Returns: the new dialog as a `GtkWidget`
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
GtkWidget*
|
||||
gtk_dialog_new (void)
|
||||
@@ -764,6 +768,8 @@ gtk_dialog_new_empty (const char *title,
|
||||
* ```
|
||||
*
|
||||
* Returns: a new `GtkDialog`
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
GtkWidget*
|
||||
gtk_dialog_new_with_buttons (const char *title,
|
||||
@@ -855,6 +861,8 @@ get_response_data (GtkDialog *dialog,
|
||||
*
|
||||
* If you want to add a non-activatable widget, simply pack it into
|
||||
* the @action_area field of the `GtkDialog` struct.
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
void
|
||||
gtk_dialog_add_action_widget (GtkDialog *dialog,
|
||||
@@ -896,6 +904,8 @@ gtk_dialog_add_action_widget (GtkDialog *dialog,
|
||||
* The button widget is returned, but usually you don’t need it.
|
||||
*
|
||||
* Returns: (transfer none): the `GtkButton` widget that was added
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
GtkWidget*
|
||||
gtk_dialog_add_button (GtkDialog *dialog,
|
||||
@@ -954,6 +964,8 @@ gtk_dialog_add_buttons_valist (GtkDialog *dialog,
|
||||
* repeatedly. The variable argument list should be %NULL-terminated
|
||||
* as with [ctor@Gtk.Dialog.new_with_buttons]. Each button must have both
|
||||
* text and response ID.
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
void
|
||||
gtk_dialog_add_buttons (GtkDialog *dialog,
|
||||
@@ -981,6 +993,8 @@ gtk_dialog_add_buttons (GtkDialog *dialog,
|
||||
*
|
||||
* Calls `gtk_widget_set_sensitive (widget, @setting)`
|
||||
* for each widget in the dialog’s action area with the given @response_id.
|
||||
*
|
||||
* Deprecated: 4.10: Set the sensitivity of your buttons directly
|
||||
*/
|
||||
void
|
||||
gtk_dialog_set_response_sensitive (GtkDialog *dialog,
|
||||
@@ -1007,6 +1021,8 @@ gtk_dialog_set_response_sensitive (GtkDialog *dialog,
|
||||
* Sets the default widget for the dialog based on the response ID.
|
||||
*
|
||||
* Pressing “Enter” normally activates the default widget.
|
||||
*
|
||||
* Deprecated: 4.10: Use gtk_window_set_default_widget()
|
||||
*/
|
||||
void
|
||||
gtk_dialog_set_default_response (GtkDialog *dialog,
|
||||
@@ -1035,6 +1051,8 @@ gtk_dialog_set_default_response (GtkDialog *dialog,
|
||||
* Emits the ::response signal with the given response ID.
|
||||
*
|
||||
* Used to indicate that the user has responded to the dialog in some way.
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
void
|
||||
gtk_dialog_response (GtkDialog *dialog,
|
||||
@@ -1058,6 +1076,8 @@ gtk_dialog_response (GtkDialog *dialog,
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the @widget button that uses the given
|
||||
* @response_id
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
GtkWidget*
|
||||
gtk_dialog_get_widget_for_response (GtkDialog *dialog,
|
||||
@@ -1087,6 +1107,8 @@ gtk_dialog_get_widget_for_response (GtkDialog *dialog,
|
||||
*
|
||||
* Returns: the response id of @widget, or %GTK_RESPONSE_NONE
|
||||
* if @widget doesn’t have a response id set.
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add buttons yourself
|
||||
*/
|
||||
int
|
||||
gtk_dialog_get_response_for_widget (GtkDialog *dialog,
|
||||
@@ -1396,6 +1418,8 @@ gtk_dialog_get_action_area (GtkDialog *dialog)
|
||||
* [property@Gtk.Dialog:use-header-bar] property is %TRUE.
|
||||
*
|
||||
* Returns: (type Gtk.HeaderBar) (transfer none): the header bar
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and add a GtkHeaderBar yourself
|
||||
*/
|
||||
GtkWidget *
|
||||
gtk_dialog_get_header_bar (GtkDialog *dialog)
|
||||
@@ -1414,6 +1438,8 @@ gtk_dialog_get_header_bar (GtkDialog *dialog)
|
||||
* Returns the content area of @dialog.
|
||||
*
|
||||
* Returns: (type Gtk.Box) (transfer none): the content area `GtkBox`.
|
||||
*
|
||||
* Deprecated: 4.10: Use a GtkWindow and populate it yourself
|
||||
*/
|
||||
GtkWidget *
|
||||
gtk_dialog_get_content_area (GtkDialog *dialog)
|
@@ -127,51 +127,51 @@ struct _GtkDialogClass
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gtk_dialog_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
GtkWidget* gtk_dialog_new (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
GtkWidget* gtk_dialog_new_with_buttons (const char *title,
|
||||
GtkWindow *parent,
|
||||
GtkDialogFlags flags,
|
||||
const char *first_button_text,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
void gtk_dialog_add_action_widget (GtkDialog *dialog,
|
||||
GtkWidget *child,
|
||||
int response_id);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
GtkWidget* gtk_dialog_add_button (GtkDialog *dialog,
|
||||
const char *button_text,
|
||||
int response_id);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
void gtk_dialog_add_buttons (GtkDialog *dialog,
|
||||
const char *first_button_text,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
void gtk_dialog_set_response_sensitive (GtkDialog *dialog,
|
||||
int response_id,
|
||||
gboolean setting);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
void gtk_dialog_set_default_response (GtkDialog *dialog,
|
||||
int response_id);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
GtkWidget* gtk_dialog_get_widget_for_response (GtkDialog *dialog,
|
||||
int response_id);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
int gtk_dialog_get_response_for_widget (GtkDialog *dialog,
|
||||
GtkWidget *widget);
|
||||
|
||||
/* Emit response signal */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
void gtk_dialog_response (GtkDialog *dialog,
|
||||
int response_id);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
GtkWidget * gtk_dialog_get_content_area (GtkDialog *dialog);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_10
|
||||
GtkWidget * gtk_dialog_get_header_bar (GtkDialog *dialog);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkDialog, g_object_unref)
|
@@ -21,6 +21,7 @@ gtk_deprecated_sources = [
|
||||
'deprecated/gtkcellview.c',
|
||||
'deprecated/gtkcombobox.c',
|
||||
'deprecated/gtkcomboboxtext.c',
|
||||
'deprecated/gtkdialog.c',
|
||||
'deprecated/gtkentrycompletion.c',
|
||||
'deprecated/gtkiconview.c',
|
||||
'deprecated/gtkliststore.c',
|
||||
@@ -62,6 +63,7 @@ gtk_deprecated_headers = [
|
||||
'deprecated/gtkcellview.h',
|
||||
'deprecated/gtkcombobox.h',
|
||||
'deprecated/gtkcomboboxtext.h',
|
||||
'deprecated/gtkdialog.h',
|
||||
'deprecated/gtkentrycompletion.h',
|
||||
'deprecated/gtkiconview.h',
|
||||
'deprecated/gtkliststore.h',
|
||||
|
@@ -94,7 +94,7 @@
|
||||
#include <gtk/gtkcustomlayout.h>
|
||||
#include <gtk/gtkcustomsorter.h>
|
||||
#include <gtk/gtkdebug.h>
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/deprecated/gtkdialog.h>
|
||||
#include <gtk/gtkdirectorylist.h>
|
||||
#include <gtk/gtkdragicon.h>
|
||||
#include <gtk/gtkdragsource.h>
|
||||
|
@@ -17,8 +17,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkdialog.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialog.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include "gtkbutton.h"
|
||||
#include "gtkbox.h"
|
||||
#include "gtkprivate.h"
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "gtkcolorchooserdialog.h"
|
||||
#include "gtkcolorchooserwidget.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkColorChooserDialog:
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/deprecated/gtkdialog.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@@ -37,11 +37,12 @@
|
||||
#include "gtkcustompaperunixdialog.h"
|
||||
#include "gtkprintbackendprivate.h"
|
||||
#include "gtkprintutils.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
|
||||
#define LEGACY_CUSTOM_PAPER_FILENAME ".gtk-custom-papers"
|
||||
#define CUSTOM_PAPER_FILENAME "custom-papers"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@@ -31,13 +31,14 @@
|
||||
#include "gtksettings.h"
|
||||
#include "gtktogglebutton.h"
|
||||
#include "gtkheaderbar.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include "gtklabel.h"
|
||||
#include "gtkfilechooserentry.h"
|
||||
#include "gtkbox.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkFileChooserDialog:
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/deprecated/gtkdialog.h>
|
||||
#include <gtk/gtkfilechooser.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@@ -506,10 +506,15 @@ gtk_file_chooser_native_init (GtkFileChooserNative *self)
|
||||
* This way we can reuse that store, plus we always have a dialog we can use
|
||||
* in case something makes the native one not work (like the custom widgets) */
|
||||
self->dialog = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG, NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
self->cancel_button = gtk_dialog_add_button (GTK_DIALOG (self->dialog), _("_Cancel"), GTK_RESPONSE_CANCEL);
|
||||
self->accept_button = gtk_dialog_add_button (GTK_DIALOG (self->dialog), _("_Open"), GTK_RESPONSE_ACCEPT);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (self->dialog), GTK_RESPONSE_ACCEPT);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
gtk_window_set_hide_on_close (GTK_WINDOW (self->dialog), TRUE);
|
||||
|
||||
/* This is used, instead of the standard delegate, to ensure that signals are not delegated. */
|
||||
|
@@ -1166,9 +1166,12 @@ confirm_delete (GtkFileChooserWidget *impl,
|
||||
name);
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
_("If you delete an item, it will be permanently lost."));
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL);
|
||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Delete"), GTK_RESPONSE_ACCEPT);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (gtk_window_has_group (toplevel))
|
||||
gtk_window_group_add_window (gtk_window_get_group (toplevel), GTK_WINDOW (dialog));
|
||||
@@ -2113,7 +2116,9 @@ get_accept_action_widget (GtkDialog *dialog,
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (response); i++)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
widget = gtk_dialog_get_widget_for_response (dialog, response[i]);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (widget)
|
||||
{
|
||||
if (!sensitive_only)
|
||||
@@ -4937,7 +4942,9 @@ add_custom_button_to_dialog (GtkDialog *dialog,
|
||||
|
||||
button = gtk_button_new_with_mnemonic (mnemonic_label);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
/* Every time we request a response explicitly, we need to save the selection to
|
||||
@@ -4991,9 +4998,11 @@ confirm_dialog_should_accept_filename (GtkFileChooserWidget *impl,
|
||||
"overwrite its contents."),
|
||||
folder_display_name);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL);
|
||||
add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"), GTK_RESPONSE_ACCEPT);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (gtk_window_has_group (toplevel))
|
||||
gtk_window_group_add_window (gtk_window_get_group (toplevel), GTK_WINDOW (dialog));
|
||||
|
@@ -32,12 +32,14 @@
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkwidget.h"
|
||||
#include "gtksettings.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include "gtktogglebutton.h"
|
||||
#include "gtkheaderbar.h"
|
||||
#include "gtkactionable.h"
|
||||
#include "gtkeventcontrollerkey.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
typedef struct _GtkFontChooserDialogClass GtkFontChooserDialogClass;
|
||||
|
||||
struct _GtkFontChooserDialog
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/deprecated/gtkdialog.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@@ -48,7 +48,7 @@
|
||||
#include "gtktextview.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtksettings.h"
|
||||
#include "gtkdialog.h"
|
||||
#include "deprecated/gtkdialog.h"
|
||||
#include "gtkgestureclick.h"
|
||||
#include "gtkeventcontrollerscroll.h"
|
||||
#include "gtkroot.h"
|
||||
@@ -297,10 +297,14 @@ stop_search_cb (GtkSearchEntry *entry,
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *button = NULL;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
dialog = gtk_widget_get_ancestor (GTK_WIDGET (fc), GTK_TYPE_DIALOG);
|
||||
if (dialog)
|
||||
button = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (button)
|
||||
gtk_widget_activate (button);
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#include "gtklabel.h"
|
||||
#include "gtkbutton.h"
|
||||
#include "gtkenums.h"
|
||||
#include "gtkdialog.h"
|
||||
#include "deprecated/gtkdialog.h"
|
||||
#include "gtkrevealer.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "gtkbox.h"
|
||||
#include "gtkbuildable.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include "gtklabel.h"
|
||||
#include "gtkprivate.h"
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkMessageDialog:
|
||||
*
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/deprecated/gtkdialog.h>
|
||||
#include <gtk/gtkenums.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@@ -45,7 +45,7 @@
|
||||
#include "gtkicontheme.h"
|
||||
#include "gtkmain.h"
|
||||
#include "gtksettings.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include "gtkpopover.h"
|
||||
#include "gtksnapshot.h"
|
||||
#include "gdktextureprivate.h"
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "gtksingleselection.h"
|
||||
#include "gtkpicture.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkMountOperation:
|
||||
|
@@ -35,7 +35,9 @@
|
||||
#include "gtkprintbackendprivate.h"
|
||||
#include "gtkpapersize.h"
|
||||
#include "gtkprintutils.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkPageSetupUnixDialog:
|
||||
|
@@ -574,6 +574,8 @@ store_entry (GtkEntry *entry,
|
||||
*data = g_strdup (gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
static void
|
||||
password_dialog_response (GtkWidget *dialog,
|
||||
int response_id,
|
||||
@@ -732,6 +734,8 @@ request_password (GtkPrintBackend *backend,
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
void
|
||||
gtk_print_backend_destroy (GtkPrintBackend *backend)
|
||||
{
|
||||
|
@@ -52,11 +52,13 @@
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include "gtkprivate.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkdialogprivate.h"
|
||||
#include "deprecated/gtkdialogprivate.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtkcsscolorvalueprivate.h"
|
||||
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkPrintUnixDialog:
|
||||
*
|
||||
|
@@ -6146,8 +6146,14 @@ gtk_window_set_debugging (GdkDisplay *display,
|
||||
gtk_widget_show (check);
|
||||
gtk_box_append (GTK_BOX (area), check);
|
||||
g_object_set_data (G_OBJECT (dialog), "check", check);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_NO);
|
||||
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_OK"), GTK_RESPONSE_YES);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (warn_response), inspector_window);
|
||||
g_object_set_data (G_OBJECT (inspector_window), "warning_dialog", dialog);
|
||||
|
||||
|
@@ -248,7 +248,11 @@ save_clicked (GtkButton *button,
|
||||
_("_Save"), GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "custom.css");
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (save_response), ce);
|
||||
gtk_widget_show (dialog);
|
||||
|
@@ -1867,7 +1867,11 @@ render_node_save (GtkButton *button,
|
||||
g_free (nodename);
|
||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), filename);
|
||||
g_free (filename);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (render_node_save_response), node);
|
||||
gtk_widget_show (dialog);
|
||||
|
@@ -198,7 +198,6 @@ gtk_public_sources = files([
|
||||
'gtkcustomfilter.c',
|
||||
'gtkcustomlayout.c',
|
||||
'gtkcustomsorter.c',
|
||||
'gtkdialog.c',
|
||||
'gtkdirectorylist.c',
|
||||
'gtkdragicon.c',
|
||||
'gtkdragsource.c',
|
||||
@@ -454,7 +453,6 @@ gtk_public_headers = files([
|
||||
'gtkcustomlayout.h',
|
||||
'gtkcustomsorter.h',
|
||||
'gtkdebug.h',
|
||||
'gtkdialog.h',
|
||||
'gtkdirectorylist.h',
|
||||
'gtkdragicon.h',
|
||||
'gtkdragsource.h',
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
static void
|
||||
show_message_dialog1 (GtkWindow *parent)
|
||||
{
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/* a fake permission implementation */
|
||||
|
||||
#define G_TYPE_TEST_PERMISSION (g_test_permission_get_type ())
|
||||
|
@@ -1,6 +1,8 @@
|
||||
/* gcc -g -Wall -O2 -o dialog-test dialog-test.c `pkg-config --cflags --libs gtk4` */
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
static GtkWidget *window;
|
||||
static GtkWidget *width_chars_spin;
|
||||
static GtkWidget *max_width_chars_spin;
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
static void
|
||||
dialog_role (void)
|
||||
{
|
||||
|
@@ -45,6 +45,7 @@ show_and_wait (GtkWidget *widget)
|
||||
g_main_context_iteration (NULL, FALSE);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
static void
|
||||
test_dialog_basic (void)
|
||||
{
|
||||
@@ -69,6 +70,7 @@ test_dialog_override_property (void)
|
||||
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
static void
|
||||
test_message_dialog_basic (void)
|
||||
|
Reference in New Issue
Block a user