[gnome-terminal] server: Simplify deprecated object property warning suppression
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] server: Simplify deprecated object property warning suppression
- Date: Sun, 10 May 2015 11:40:06 +0000 (UTC)
commit 26922baf4bc4c123ad762b23d978f26f3828ea69
Author: Christian Persch <chpe gnome org>
Date: Sun May 10 13:38:51 2015 +0200
server: Simplify deprecated object property warning suppression
Simply set G_ENABLE_DIAGNOSTIC=0 which should be the default anyway except
that it is broken [https://bugzilla.gnome.org/show_bug.cgi?id=749195].
src/server.c | 4 ++++
src/terminal-app.c | 19 -------------------
src/terminal-screen-container.c | 3 ---
src/terminal-util.h | 26 --------------------------
src/terminal-window.c | 3 ---
5 files changed, 4 insertions(+), 51 deletions(-)
---
diff --git a/src/server.c b/src/server.c
index 9381844..8d3a7d8 100644
--- a/src/server.c
+++ b/src/server.c
@@ -130,6 +130,10 @@ main (int argc, char **argv)
/* Sanitise environment */
g_unsetenv ("DBUS_STARTER_BUS_TYPE");
+ /* Not interested in silly debug spew polluting the journal, bug #749195 */
+ if (g_getenv ("G_ENABLE_DIAGNOSTIC") == NULL)
+ g_setenv ("G_ENABLE_DIAGNOSTIC", "0", TRUE);
+
#ifndef ENABLE_DISTRO_PACKAGING
#ifdef HAVE_UBUNTU
/* Set some env vars to disable the ubuntu modules. Their package will be
diff --git a/src/terminal-app.c b/src/terminal-app.c
index ff9609e..1ca532d 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -371,25 +371,6 @@ terminal_app_init (TerminalApp *app)
settings = g_settings_get_child (app->global_settings, "keybindings");
terminal_accels_init (G_APPLICATION (app), settings);
-
-#if 1
-{
- /* Not interested in silly debug spew polluting the journal */
- /* Legacy gtkuimanager menu accelerator */
- /* Disallow in-place menu accel changes. Only needed on gtk 3.8,
- * it's unused and ignored from 3.10 onward. */
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_SETTINGS, "gtk-can-change-accels");
- g_object_set (gtk_settings_get_default (), "gtk-can-change-accels", FALSE, NULL);
-
- /* Our dialogues cause these */
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_BUTTON, "use-stock");
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_BUTTON, "xalign");
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_WIDGET, "margin-left");
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_WIDGET, "margin-right");
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_SETTINGS, "gtk-button-images");
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_TREE_VIEW, "rules-hint");
-}
-#endif
}
static void
diff --git a/src/terminal-screen-container.c b/src/terminal-screen-container.c
index 51012e7..1864712 100644
--- a/src/terminal-screen-container.c
+++ b/src/terminal-screen-container.c
@@ -18,7 +18,6 @@
#include "config.h"
#include "terminal-screen-container.h"
-#include "terminal-util.h"
#include "terminal-debug.h"
#include <gtk/gtk.h>
@@ -66,8 +65,6 @@ terminal_screen_container_style_updated (GtkWidget *widget)
NULL);
if (!set) {
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_SETTINGS,
- "gtk-scrolled-window-placement");
g_object_get (gtk_widget_get_settings (widget),
"gtk-scrolled-window-placement", &corner,
NULL);
diff --git a/src/terminal-util.h b/src/terminal-util.h
index 0367429..043fb2b 100644
--- a/src/terminal-util.h
+++ b/src/terminal-util.h
@@ -88,32 +88,6 @@ void terminal_util_bind_mnemonic_label_sensitivity (GtkWidget *widget);
void terminal_util_object_class_undeprecate_property (GObjectClass *klass,
const char *prop);
-#define TERMINAL_UTIL_OBJECT_CLASS_UNDEPRECATE_PROPERTY(klass, prop) \
- { \
- static volatile gsize once = 0; \
- \
- if (g_once_init_enter (&once)) { \
- GParamSpec *pspec; \
- \
- pspec = g_object_class_find_property (klass, prop); \
- g_warn_if_fail (pspec != NULL); \
- if (pspec) { \
- g_warn_if_fail (pspec->flags & G_PARAM_DEPRECATED); \
- pspec->flags &= ~G_PARAM_DEPRECATED; \
- } \
- g_once_init_leave (&once, 1); \
- } \
- }
-
-#define TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY(type, prop) \
- { \
- GObjectClass *klass; \
- \
- klass = g_type_class_ref (type); \
- TERMINAL_UTIL_OBJECT_CLASS_UNDEPRECATE_PROPERTY (klass, prop); \
- g_type_class_unref (klass); \
- }
-
G_END_DECLS
#endif /* TERMINAL_UTIL_H */
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 969e9ee..b254cd7 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2630,9 +2630,6 @@ terminal_window_init (TerminalWindow *window)
gaction_entries, G_N_ELEMENTS (gaction_entries),
window);
- /* The GtkAction/GtkUIManager menus access this from inside gtk+, so suppress the warning */
- TERMINAL_UTIL_OBJECT_TYPE_UNDEPRECATE_PROPERTY (GTK_TYPE_SETTINGS, "gtk-menu-images");
-
/* Create the UI manager */
manager = priv->ui_manager = gtk_ui_manager_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]