forked from AuroraMiddleware/gtk
Deprecate GtkStatusbar
The design patterns using statusbar are no longer popular, and it is pretty easy to make a statusbar yourself with boxes and labels, if you need one. The only thing special about GtkStatusbar was its window resize handle, but that has been gone for a long time.
This commit is contained in:
parent
8796950651
commit
d8cb11ec4a
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
typedef GtkApplication DemoApplication;
|
typedef GtkApplication DemoApplication;
|
||||||
typedef GtkApplicationClass DemoApplicationClass;
|
typedef GtkApplicationClass DemoApplicationClass;
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@ remove_timeout (gpointer data)
|
|||||||
g_source_remove (id);
|
g_source_remove (id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
pop_status (gpointer data)
|
pop_status (gpointer data)
|
||||||
{
|
{
|
||||||
@ -57,6 +59,8 @@ status_message (GtkStatusbar *status,
|
|||||||
g_object_set_data_full (G_OBJECT (status), "timeout", GUINT_TO_POINTER (id), remove_timeout);
|
g_object_set_data_full (G_OBJECT (status), "timeout", GUINT_TO_POINTER (id), remove_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
static void
|
static void
|
||||||
help_activate (GSimpleAction *action,
|
help_activate (GSimpleAction *action,
|
||||||
GVariant *parameter,
|
GVariant *parameter,
|
||||||
|
@ -2252,11 +2252,13 @@ activate (GApplication *app)
|
|||||||
for (i = 0; i < G_N_ELEMENTS (accels); i++)
|
for (i = 0; i < G_N_ELEMENTS (accels); i++)
|
||||||
gtk_application_set_accels_for_action (GTK_APPLICATION (app), accels[i].action_and_target, accels[i].accelerators);
|
gtk_application_set_accels_for_action (GTK_APPLICATION (app), accels[i].action_and_target, accels[i].accelerators);
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "statusbar");
|
widget = (GtkWidget *)gtk_builder_get_object (builder, "statusbar");
|
||||||
gtk_statusbar_push (GTK_STATUSBAR (widget), 0, "All systems are operating normally.");
|
gtk_statusbar_push (GTK_STATUSBAR (widget), 0, "All systems are operating normally.");
|
||||||
action = G_ACTION (g_property_action_new ("statusbar", widget, "visible"));
|
action = G_ACTION (g_property_action_new ("statusbar", widget, "visible"));
|
||||||
g_action_map_add_action (G_ACTION_MAP (window), action);
|
g_action_map_add_action (G_ACTION_MAP (window), action);
|
||||||
g_object_unref (G_OBJECT (action));
|
g_object_unref (G_OBJECT (action));
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "toolbar");
|
widget = (GtkWidget *)gtk_builder_get_object (builder, "toolbar");
|
||||||
action = G_ACTION (g_property_action_new ("toolbar", widget, "visible"));
|
action = G_ACTION (g_property_action_new ("toolbar", widget, "visible"));
|
||||||
|
@ -109,3 +109,8 @@ Other libraries, such as libadwaita, may provide replacements as well.
|
|||||||
## gtk_show_uri is being replaced
|
## gtk_show_uri is being replaced
|
||||||
|
|
||||||
Instead of gtk_show_uri(), you should use GtkUriLauncher or GtkFileLauncher.
|
Instead of gtk_show_uri(), you should use GtkUriLauncher or GtkFileLauncher.
|
||||||
|
|
||||||
|
## GtkStatusbar is going away
|
||||||
|
|
||||||
|
This is an oldfashioned widget that does not do all that much anymore, since
|
||||||
|
it no longer has a resize handle for the window.
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#include "gtktypebuiltins.h"
|
#include "gtktypebuiltins.h"
|
||||||
#include "gtkwidgetprivate.h"
|
#include "gtkwidgetprivate.h"
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkStatusbar:
|
* GtkStatusbar:
|
||||||
*
|
*
|
@ -42,23 +42,23 @@ typedef struct _GtkStatusbar GtkStatusbar;
|
|||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GType gtk_statusbar_get_type (void) G_GNUC_CONST;
|
GType gtk_statusbar_get_type (void) G_GNUC_CONST;
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_4_10
|
||||||
GtkWidget* gtk_statusbar_new (void);
|
GtkWidget* gtk_statusbar_new (void);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_4_10
|
||||||
guint gtk_statusbar_get_context_id (GtkStatusbar *statusbar,
|
guint gtk_statusbar_get_context_id (GtkStatusbar *statusbar,
|
||||||
const char *context_description);
|
const char *context_description);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_4_10
|
||||||
guint gtk_statusbar_push (GtkStatusbar *statusbar,
|
guint gtk_statusbar_push (GtkStatusbar *statusbar,
|
||||||
guint context_id,
|
guint context_id,
|
||||||
const char *text);
|
const char *text);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_statusbar_pop (GtkStatusbar *statusbar,
|
void gtk_statusbar_pop (GtkStatusbar *statusbar,
|
||||||
guint context_id);
|
guint context_id);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_statusbar_remove (GtkStatusbar *statusbar,
|
void gtk_statusbar_remove (GtkStatusbar *statusbar,
|
||||||
guint context_id,
|
guint context_id,
|
||||||
guint message_id);
|
guint message_id);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_DEPRECATED_IN_4_10
|
||||||
void gtk_statusbar_remove_all (GtkStatusbar *statusbar,
|
void gtk_statusbar_remove_all (GtkStatusbar *statusbar,
|
||||||
guint context_id);
|
guint context_id);
|
||||||
|
|
@ -33,6 +33,7 @@ gtk_deprecated_sources = [
|
|||||||
'deprecated/gtkliststore.c',
|
'deprecated/gtkliststore.c',
|
||||||
'deprecated/gtkrender.c',
|
'deprecated/gtkrender.c',
|
||||||
'deprecated/gtkshow.c',
|
'deprecated/gtkshow.c',
|
||||||
|
'deprecated/gtkstatusbar.c',
|
||||||
'deprecated/gtkstylecontext.c',
|
'deprecated/gtkstylecontext.c',
|
||||||
'deprecated/gtktreedatalist.c',
|
'deprecated/gtktreedatalist.c',
|
||||||
'deprecated/gtktreednd.c',
|
'deprecated/gtktreednd.c',
|
||||||
@ -90,6 +91,7 @@ gtk_deprecated_headers = [
|
|||||||
'deprecated/gtkmessagedialog.h',
|
'deprecated/gtkmessagedialog.h',
|
||||||
'deprecated/gtkrender.h',
|
'deprecated/gtkrender.h',
|
||||||
'deprecated/gtkshow.h',
|
'deprecated/gtkshow.h',
|
||||||
|
'deprecated/gtkstatusbar.h',
|
||||||
'deprecated/gtkstylecontext.h',
|
'deprecated/gtkstylecontext.h',
|
||||||
'deprecated/gtktreednd.h',
|
'deprecated/gtktreednd.h',
|
||||||
'deprecated/gtktreemodel.h',
|
'deprecated/gtktreemodel.h',
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
#include <gtk/gtkspinner.h>
|
#include <gtk/gtkspinner.h>
|
||||||
#include <gtk/gtkstack.h>
|
#include <gtk/gtkstack.h>
|
||||||
#include <gtk/gtkstackswitcher.h>
|
#include <gtk/gtkstackswitcher.h>
|
||||||
#include <gtk/gtkstatusbar.h>
|
#include <gtk/deprecated/gtkstatusbar.h>
|
||||||
#include <gtk/gtkstringfilter.h>
|
#include <gtk/gtkstringfilter.h>
|
||||||
#include <gtk/gtkstringlist.h>
|
#include <gtk/gtkstringlist.h>
|
||||||
#include <gtk/gtkstringsorter.h>
|
#include <gtk/gtkstringsorter.h>
|
||||||
|
@ -360,7 +360,6 @@ gtk_public_sources = files([
|
|||||||
'gtkstack.c',
|
'gtkstack.c',
|
||||||
'gtkstacksidebar.c',
|
'gtkstacksidebar.c',
|
||||||
'gtkstackswitcher.c',
|
'gtkstackswitcher.c',
|
||||||
'gtkstatusbar.c',
|
|
||||||
'gtkstringfilter.c',
|
'gtkstringfilter.c',
|
||||||
'gtkstringlist.c',
|
'gtkstringlist.c',
|
||||||
'gtkstringsorter.c',
|
'gtkstringsorter.c',
|
||||||
@ -593,7 +592,6 @@ gtk_public_headers = files([
|
|||||||
'gtkstack.h',
|
'gtkstack.h',
|
||||||
'gtkstacksidebar.h',
|
'gtkstacksidebar.h',
|
||||||
'gtkstackswitcher.h',
|
'gtkstackswitcher.h',
|
||||||
'gtkstatusbar.h',
|
|
||||||
'gtkstringfilter.h',
|
'gtkstringfilter.h',
|
||||||
'gtkstringlist.h',
|
'gtkstringlist.h',
|
||||||
'gtkstringsorter.h',
|
'gtkstringsorter.h',
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
GSList *pending = NULL;
|
GSList *pending = NULL;
|
||||||
guint active = 0;
|
guint active = 0;
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
#define FILE_INFO_TYPE_SELECTION (file_info_selection_get_type ())
|
#define FILE_INFO_TYPE_SELECTION (file_info_selection_get_type ())
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (FileInfoSelection, file_info_selection, FILE_INFO, SELECTION, GObject)
|
G_DECLARE_FINAL_TYPE (FileInfoSelection, file_info_selection, FILE_INFO, SELECTION, GObject)
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
G_MODULE_EXPORT void
|
G_MODULE_EXPORT void
|
||||||
statusbar_remove_all (GtkStatusbar *s)
|
statusbar_remove_all (GtkStatusbar *s)
|
||||||
|
Loading…
Reference in New Issue
Block a user