]> Pileus Git - ~andy/gtk/commitdiff
fatal warning option is split up now, "--g-fatal-warnings" causes fatal
authorTim Janik <timj@gtk.org>
Sun, 16 Aug 1998 21:15:11 +0000 (21:15 +0000)
committerTim Janik <timj@src.gnome.org>
Sun, 16 Aug 1998 21:15:11 +0000 (21:15 +0000)
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.

16 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
Makefile.am
configure.in
gdk/Makefile.am
gdk/gxid.c
gdk/x11/gxid.c
gtk/Makefile.am
gtk/gtkmain.c
gtk/testgtk.c
tests/testgtk.c

index 8bf2e9cc90f8587219132e2f69b220dea7b78f0c..18e910d53b0e53e81977e764614782bc2d190998 100644 (file)
--- 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
index 8bf2e9cc90f8587219132e2f69b220dea7b78f0c..18e910d53b0e53e81977e764614782bc2d190998 100644 (file)
@@ -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
index 8bf2e9cc90f8587219132e2f69b220dea7b78f0c..18e910d53b0e53e81977e764614782bc2d190998 100644 (file)
@@ -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
index 8bf2e9cc90f8587219132e2f69b220dea7b78f0c..18e910d53b0e53e81977e764614782bc2d190998 100644 (file)
@@ -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
index 8bf2e9cc90f8587219132e2f69b220dea7b78f0c..18e910d53b0e53e81977e764614782bc2d190998 100644 (file)
@@ -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
index 8bf2e9cc90f8587219132e2f69b220dea7b78f0c..18e910d53b0e53e81977e764614782bc2d190998 100644 (file)
@@ -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
index 8bf2e9cc90f8587219132e2f69b220dea7b78f0c..18e910d53b0e53e81977e764614782bc2d190998 100644 (file)
@@ -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
index dcc09f60b4b8f4084926ec83e20b62a20f7923c1..3a023e5f74bac88252af9ebcc4aacd00043452bb 100644 (file)
@@ -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     \
index 53fdbf34fa29e65c54723dc27ba4908a33da473d..486340d7deb9b0fa5a874c9b02c96322d139d1ea 100644 (file)
@@ -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.]))
index 002e7c42bbf5d1421ef670aa116fd4b91ff1feb5..90b85139ba6f22092d5cfdf473827d3bc3635b04 100644 (file)
@@ -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           \
index 190eb0678faea4d17851dda5ddbc294e2dab841b..2b0994cbcb1cee4a42917bb08510eca99201582a 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright 1997 Owen Taylor <owt1@cornell.edu>
 */
+#undef G_LOG_DOMAIN
 
 #include <stdio.h>
 #include <stdlib.h>
index 190eb0678faea4d17851dda5ddbc294e2dab841b..2b0994cbcb1cee4a42917bb08510eca99201582a 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright 1997 Owen Taylor <owt1@cornell.edu>
 */
+#undef G_LOG_DOMAIN
 
 #include <stdio.h>
 #include <stdlib.h>
index f61ae5d56ecadd5aca73eccf08202b5c9c48c15a..0f87da39a638fbbd1f774b44500fd9e1cb7b4c9a 100644 (file)
@@ -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
 
index e41a7935163e9c6421e3c6eff702fe757d96dace..b1c5ceda50e38d547404d756f233b02029701cfc 100644 (file)
@@ -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;
index 6962c27a29345bfa0bc77e700a7588177574a037..eb66cacf34dcf949f3c7a9bf23d3cd7678c67af5 100644 (file)
@@ -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]);
index 6962c27a29345bfa0bc77e700a7588177574a037..eb66cacf34dcf949f3c7a9bf23d3cd7678c67af5 100644 (file)
@@ -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]);