summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-08-16 21:15:11 +0000
committerTim Janik <timj@src.gnome.org>1998-08-16 21:15:11 +0000
commit31de6ff4e08c6bac186706f434089b30bc8c2770 (patch)
tree3e2c3feeeb3990dab9e147e62d4fc8f1f9e6e452
parenta4a3c87b3d3514cf6712f51a3cf235904ca035e5 (diff)
downloadgtk+-31de6ff4e08c6bac186706f434089b30bc8c2770.tar.gz
fatal warning option is split up now, "--g-fatal-warnings" causes fatal
Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org> * gtk/gtkmain.c (gtk_init): fatal warning option is split up now, "--g-fatal-warnings" causes fatal warnings in GLib, "--gdk-fatal-warnings" causes fatal warnings in Gdk, "--gtk-fatal-warnings" causes fatal warnings in Gtk. * gtk/Makefile.am: define G_LOG_DOMAIN for gtk. * gdk/Makefile.am: define G_LOG_DOMAIN for gdk. * gtk/testgtk.c: * gdk/gxid.c: we need ugly #undef G_LOG_DOMAIN at the start of these files currently, since automake doesn't support per target _CFLAGS yet. * configure.in: require GLib 1.1.3.
-rw-r--r--ChangeLog17
-rw-r--r--ChangeLog.pre-2-017
-rw-r--r--ChangeLog.pre-2-1017
-rw-r--r--ChangeLog.pre-2-217
-rw-r--r--ChangeLog.pre-2-417
-rw-r--r--ChangeLog.pre-2-617
-rw-r--r--ChangeLog.pre-2-817
-rw-r--r--Makefile.am1
-rw-r--r--configure.in2
-rw-r--r--gdk/Makefile.am1
-rw-r--r--gdk/gxid.c1
-rw-r--r--gdk/x11/gxid.c1
-rw-r--r--gtk/Makefile.am1
-rw-r--r--gtk/gtkmain.c37
-rw-r--r--gtk/testgtk.c51
-rw-r--r--tests/testgtk.c51
16 files changed, 214 insertions, 51 deletions
diff --git a/ChangeLog b/ChangeLog
index 8bf2e9cc90..18e910d53b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
+ "--g-fatal-warnings" causes fatal warnings in GLib,
+ "--gdk-fatal-warnings" causes fatal warnings in Gdk,
+ "--gtk-fatal-warnings" causes fatal warnings in Gtk.
+
+ * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
+ * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.
+
+ * gtk/testgtk.c:
+ * gdk/gxid.c:
+ we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
+ since automake doesn't support per target _CFLAGS yet.
+
+ * configure.in: require GLib 1.1.3.
+
Sat Aug 15 03:19:30 1998 John Ellis <johne@bellatlantic.net>
* gtk/gtkctree.[ch] (gtk_ctree_set_drag_compare_func): New function
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 8bf2e9cc90..18e910d53b 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,20 @@
+Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
+ "--g-fatal-warnings" causes fatal warnings in GLib,
+ "--gdk-fatal-warnings" causes fatal warnings in Gdk,
+ "--gtk-fatal-warnings" causes fatal warnings in Gtk.
+
+ * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
+ * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.
+
+ * gtk/testgtk.c:
+ * gdk/gxid.c:
+ we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
+ since automake doesn't support per target _CFLAGS yet.
+
+ * configure.in: require GLib 1.1.3.
+
Sat Aug 15 03:19:30 1998 John Ellis <johne@bellatlantic.net>
* gtk/gtkctree.[ch] (gtk_ctree_set_drag_compare_func): New function
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 8bf2e9cc90..18e910d53b 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,20 @@
+Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
+ "--g-fatal-warnings" causes fatal warnings in GLib,
+ "--gdk-fatal-warnings" causes fatal warnings in Gdk,
+ "--gtk-fatal-warnings" causes fatal warnings in Gtk.
+
+ * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
+ * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.
+
+ * gtk/testgtk.c:
+ * gdk/gxid.c:
+ we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
+ since automake doesn't support per target _CFLAGS yet.
+
+ * configure.in: require GLib 1.1.3.
+
Sat Aug 15 03:19:30 1998 John Ellis <johne@bellatlantic.net>
* gtk/gtkctree.[ch] (gtk_ctree_set_drag_compare_func): New function
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 8bf2e9cc90..18e910d53b 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,20 @@
+Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
+ "--g-fatal-warnings" causes fatal warnings in GLib,
+ "--gdk-fatal-warnings" causes fatal warnings in Gdk,
+ "--gtk-fatal-warnings" causes fatal warnings in Gtk.
+
+ * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
+ * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.
+
+ * gtk/testgtk.c:
+ * gdk/gxid.c:
+ we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
+ since automake doesn't support per target _CFLAGS yet.
+
+ * configure.in: require GLib 1.1.3.
+
Sat Aug 15 03:19:30 1998 John Ellis <johne@bellatlantic.net>
* gtk/gtkctree.[ch] (gtk_ctree_set_drag_compare_func): New function
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 8bf2e9cc90..18e910d53b 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,20 @@
+Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
+ "--g-fatal-warnings" causes fatal warnings in GLib,
+ "--gdk-fatal-warnings" causes fatal warnings in Gdk,
+ "--gtk-fatal-warnings" causes fatal warnings in Gtk.
+
+ * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
+ * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.
+
+ * gtk/testgtk.c:
+ * gdk/gxid.c:
+ we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
+ since automake doesn't support per target _CFLAGS yet.
+
+ * configure.in: require GLib 1.1.3.
+
Sat Aug 15 03:19:30 1998 John Ellis <johne@bellatlantic.net>
* gtk/gtkctree.[ch] (gtk_ctree_set_drag_compare_func): New function
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 8bf2e9cc90..18e910d53b 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,20 @@
+Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
+ "--g-fatal-warnings" causes fatal warnings in GLib,
+ "--gdk-fatal-warnings" causes fatal warnings in Gdk,
+ "--gtk-fatal-warnings" causes fatal warnings in Gtk.
+
+ * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
+ * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.
+
+ * gtk/testgtk.c:
+ * gdk/gxid.c:
+ we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
+ since automake doesn't support per target _CFLAGS yet.
+
+ * configure.in: require GLib 1.1.3.
+
Sat Aug 15 03:19:30 1998 John Ellis <johne@bellatlantic.net>
* gtk/gtkctree.[ch] (gtk_ctree_set_drag_compare_func): New function
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 8bf2e9cc90..18e910d53b 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,20 @@
+Sun Aug 16 20:51:59 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
+ "--g-fatal-warnings" causes fatal warnings in GLib,
+ "--gdk-fatal-warnings" causes fatal warnings in Gdk,
+ "--gtk-fatal-warnings" causes fatal warnings in Gtk.
+
+ * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
+ * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.
+
+ * gtk/testgtk.c:
+ * gdk/gxid.c:
+ we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
+ since automake doesn't support per target _CFLAGS yet.
+
+ * configure.in: require GLib 1.1.3.
+
Sat Aug 15 03:19:30 1998 John Ellis <johne@bellatlantic.net>
* gtk/gtkctree.[ch] (gtk_ctree_set_drag_compare_func): New function
diff --git a/Makefile.am b/Makefile.am
index dcc09f60b4..3a023e5f74 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,6 +13,7 @@ EXTRA_DIST = \
TODO \
NEWS.pre-1-0 \
ChangeLog.pre-1-0 \
+ README.cvs-commits \
examples/README.1ST \
examples/extract.awk \
examples/extract.sh \
diff --git a/configure.in b/configure.in
index 53fdbf34fa..486340d7de 100644
--- a/configure.in
+++ b/configure.in
@@ -138,7 +138,7 @@ fi
if test x$with_glib = x ; then
# Look for separately installed glib
- AM_PATH_GLIB(1.1.1,,
+ AM_PATH_GLIB(1.1.3,,
AC_MSG_ERROR([
*** GLIB 1.1.1 or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org.]))
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 002e7c42bb..90b85139ba 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -3,6 +3,7 @@
gdkincludedir = $(includedir)/gdk
lib_LTLIBRARIES = libgdk-1.1.la
+DEFS += -DG_LOG_DOMAIN=\"Gdk\"
libgdk_1_1_la_SOURCES = \
gdk.c \
diff --git a/gdk/gxid.c b/gdk/gxid.c
index 190eb0678f..2b0994cbcb 100644
--- a/gdk/gxid.c
+++ b/gdk/gxid.c
@@ -3,6 +3,7 @@
*
* Copyright 1997 Owen Taylor <owt1@cornell.edu>
*/
+#undef G_LOG_DOMAIN
#include <stdio.h>
#include <stdlib.h>
diff --git a/gdk/x11/gxid.c b/gdk/x11/gxid.c
index 190eb0678f..2b0994cbcb 100644
--- a/gdk/x11/gxid.c
+++ b/gdk/x11/gxid.c
@@ -3,6 +3,7 @@
*
* Copyright 1997 Owen Taylor <owt1@cornell.edu>
*/
+#undef G_LOG_DOMAIN
#include <stdio.h>
#include <stdlib.h>
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index f61ae5d56e..0f87da39a6 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -1,6 +1,7 @@
### Process this file with automake to produce Makefile.in
gtkincludedir = $(includedir)/gtk
+DEFS += -DG_LOG_DOMAIN=\"Gtk\"
lib_LTLIBRARIES = libgtk-1.1.la
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index e41a793516..b1c5ceda50 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -238,13 +238,12 @@ gtk_init (int *argc,
if (gtk_initialized)
return;
- if (0)
- {
- g_set_error_handler (gtk_error);
- g_set_warning_handler (gtk_warning);
- g_set_message_handler (gtk_message);
- g_set_print_handler (gtk_print);
- }
+#if 0
+ g_set_error_handler (gtk_error);
+ g_set_warning_handler (gtk_warning);
+ g_set_message_handler (gtk_message);
+ g_set_print_handler (gtk_print);
+#endif
/* Initialize "gdk". We pass along the 'argc' and 'argv'
* parameters as they contain information that GDK uses
@@ -310,7 +309,29 @@ gtk_init (int *argc,
}
else if (strcmp ("--g-fatal-warnings", (*argv)[i]) == 0)
{
- g_set_warning_handler ((GWarningFunc)g_error);
+ GLogLevelFlags fatal_levels;
+
+ fatal_levels = g_log_set_fatal_mask (g_log_domain_glib, G_LOG_FATAL_MASK);
+ fatal_levels |= G_LOG_LEVEL_WARNING;
+ g_log_set_fatal_mask (g_log_domain_glib, fatal_levels);
+ (*argv)[i] = NULL;
+ }
+ else if (strcmp ("--gdk-fatal-warnings", (*argv)[i]) == 0)
+ {
+ GLogLevelFlags fatal_levels;
+
+ fatal_levels = g_log_set_fatal_mask ("Gdk", G_LOG_FATAL_MASK);
+ fatal_levels |= G_LOG_LEVEL_WARNING;
+ g_log_set_fatal_mask ("Gdk", fatal_levels);
+ (*argv)[i] = NULL;
+ }
+ else if (strcmp ("--gtk-fatal-warnings", (*argv)[i]) == 0)
+ {
+ GLogLevelFlags fatal_levels;
+
+ fatal_levels = g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_FATAL_MASK);
+ fatal_levels |= G_LOG_LEVEL_WARNING;
+ g_log_set_fatal_mask (G_LOG_DOMAIN, fatal_levels);
(*argv)[i] = NULL;
}
i += 1;
diff --git a/gtk/testgtk.c b/gtk/testgtk.c
index 6962c27a29..eb66cacf34 100644
--- a/gtk/testgtk.c
+++ b/gtk/testgtk.c
@@ -16,6 +16,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+#undef G_LOG_DOMAIN
#include <stdio.h>
#include <stdlib.h>
@@ -2121,29 +2122,37 @@ create_menus (void)
gtk_widget_destroy (window);
}
+static void
+gtk_ifactory_cb (gpointer callback_data,
+ guint callback_action,
+ GtkWidget *widget)
+{
+ g_message ("ItemFactory: activated \"%s\"", gtk_item_factory_path_from_widget (widget));
+}
+
static GtkItemFactoryEntry menu_items[] =
{
- { "/_File", NULL, NULL, 0, "<Branch>" },
- { "/File/tearoff1", NULL, NULL, 0, "<Tearoff>" },
- { "/File/_New", "<control>N", NULL, 0 },
- { "/File/_Open", "<control>O", NULL, 0 },
- { "/File/_Save", "<control>S", NULL, 0 },
- { "/File/Save _As...", NULL, NULL, 0 },
- { "/File/sep1", NULL, NULL, 0, "<Separator>" },
- { "/File/_Quit", "<control>Q", NULL, 0 },
-
- { "/_Preferences", NULL, NULL, 0, "<Branch>" },
- { "/_Preferences/_Color", NULL, NULL, 0, "<Branch>" },
- { "/_Preferences/Color/_Red", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Green", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Blue", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/_Shape", NULL, NULL, 0, "<Branch>" },
- { "/_Preferences/Shape/_Square", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Rectangle", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Oval", NULL, NULL, 0, "<RadioItem>" },
-
- { "/_Help", NULL, NULL, 0, "<LastBranch>" },
- { "/Help/_About", NULL, NULL, 0 },
+ { "/_File", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/File/tearoff1", NULL, gtk_ifactory_cb, 0, "<Tearoff>" },
+ { "/File/_New", "<control>N", gtk_ifactory_cb, 0 },
+ { "/File/_Open", "<control>O", gtk_ifactory_cb, 0 },
+ { "/File/_Save", "<control>S", gtk_ifactory_cb, 0 },
+ { "/File/Save _As...", NULL, gtk_ifactory_cb, 0 },
+ { "/File/sep1", NULL, gtk_ifactory_cb, 0, "<Separator>" },
+ { "/File/_Quit", "<control>Q", gtk_ifactory_cb, 0 },
+
+ { "/_Preferences", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/_Preferences/_Color", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/_Preferences/Color/_Red", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Color/_Green", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Color/_Blue", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/_Shape", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/_Preferences/Shape/_Square", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Shape/_Rectangle", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Shape/_Oval", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+
+ { "/_Help", NULL, gtk_ifactory_cb, 0, "<LastBranch>" },
+ { "/Help/_About", NULL, gtk_ifactory_cb, 0 },
};
static int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 6962c27a29..eb66cacf34 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -16,6 +16,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+#undef G_LOG_DOMAIN
#include <stdio.h>
#include <stdlib.h>
@@ -2121,29 +2122,37 @@ create_menus (void)
gtk_widget_destroy (window);
}
+static void
+gtk_ifactory_cb (gpointer callback_data,
+ guint callback_action,
+ GtkWidget *widget)
+{
+ g_message ("ItemFactory: activated \"%s\"", gtk_item_factory_path_from_widget (widget));
+}
+
static GtkItemFactoryEntry menu_items[] =
{
- { "/_File", NULL, NULL, 0, "<Branch>" },
- { "/File/tearoff1", NULL, NULL, 0, "<Tearoff>" },
- { "/File/_New", "<control>N", NULL, 0 },
- { "/File/_Open", "<control>O", NULL, 0 },
- { "/File/_Save", "<control>S", NULL, 0 },
- { "/File/Save _As...", NULL, NULL, 0 },
- { "/File/sep1", NULL, NULL, 0, "<Separator>" },
- { "/File/_Quit", "<control>Q", NULL, 0 },
-
- { "/_Preferences", NULL, NULL, 0, "<Branch>" },
- { "/_Preferences/_Color", NULL, NULL, 0, "<Branch>" },
- { "/_Preferences/Color/_Red", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Green", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Color/_Blue", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/_Shape", NULL, NULL, 0, "<Branch>" },
- { "/_Preferences/Shape/_Square", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Rectangle", NULL, NULL, 0, "<RadioItem>" },
- { "/_Preferences/Shape/_Oval", NULL, NULL, 0, "<RadioItem>" },
-
- { "/_Help", NULL, NULL, 0, "<LastBranch>" },
- { "/Help/_About", NULL, NULL, 0 },
+ { "/_File", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/File/tearoff1", NULL, gtk_ifactory_cb, 0, "<Tearoff>" },
+ { "/File/_New", "<control>N", gtk_ifactory_cb, 0 },
+ { "/File/_Open", "<control>O", gtk_ifactory_cb, 0 },
+ { "/File/_Save", "<control>S", gtk_ifactory_cb, 0 },
+ { "/File/Save _As...", NULL, gtk_ifactory_cb, 0 },
+ { "/File/sep1", NULL, gtk_ifactory_cb, 0, "<Separator>" },
+ { "/File/_Quit", "<control>Q", gtk_ifactory_cb, 0 },
+
+ { "/_Preferences", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/_Preferences/_Color", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/_Preferences/Color/_Red", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Color/_Green", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Color/_Blue", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/_Shape", NULL, gtk_ifactory_cb, 0, "<Branch>" },
+ { "/_Preferences/Shape/_Square", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Shape/_Rectangle", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+ { "/_Preferences/Shape/_Oval", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
+
+ { "/_Help", NULL, gtk_ifactory_cb, 0, "<LastBranch>" },
+ { "/Help/_About", NULL, gtk_ifactory_cb, 0 },
};
static int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);