]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/assertdlg_gtk.cpp
Remove some old redundant code
[wxWidgets.git] / src / gtk / assertdlg_gtk.cpp
index 17d46608d57c8a4fdf4f62b1d62a9275baaf57bd..a495ce7ace5135817f71187173b2487e38a63af9 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk/assertdlg_gtk.cpp
 // Purpose:     GtkAssertDialog
 // Author:      Francesco Montorsi
-// Id:          $Id$
 // Copyright:   (c) 2006 Francesco Montorsi
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////// */
@@ -34,6 +33,7 @@
    GtkAssertDialog helpers
  ---------------------------------------------------------------------------- */
 
+static
 GtkWidget *gtk_assert_dialog_add_button_to (GtkBox *box, const gchar *label,
                                             const gchar *stock)
 {
@@ -52,6 +52,7 @@ GtkWidget *gtk_assert_dialog_add_button_to (GtkBox *box, const gchar *label,
     return button;
 }
 
+static
 GtkWidget *gtk_assert_dialog_add_button (GtkAssertDialog *dlg, const gchar *label,
                                          const gchar *stock, gint response_id)
 {
@@ -66,6 +67,7 @@ GtkWidget *gtk_assert_dialog_add_button (GtkAssertDialog *dlg, const gchar *labe
 
 #if wxUSE_STACKWALKER
 
+static
 void gtk_assert_dialog_append_text_column (GtkWidget *treeview, const gchar *name, int index)
 {
     GtkCellRenderer *renderer;
@@ -79,6 +81,7 @@ void gtk_assert_dialog_append_text_column (GtkWidget *treeview, const gchar *nam
     gtk_tree_view_column_set_reorderable (column, TRUE);
 }
 
+static
 GtkWidget *gtk_assert_dialog_create_backtrace_list_model ()
 {
     GtkListStore *store;
@@ -105,6 +108,7 @@ GtkWidget *gtk_assert_dialog_create_backtrace_list_model ()
     return treeview;
 }
 
+static
 void gtk_assert_dialog_process_backtrace (GtkAssertDialog *dlg)
 {
     /* set busy cursor */
@@ -226,8 +230,9 @@ static void gtk_assert_dialog_continue_callback(GtkWidget*, GtkAssertDialog* dlg
    GtkAssertDialogClass implementation
  ---------------------------------------------------------------------------- */
 
-static void     gtk_assert_dialog_init              (GtkAssertDialog        *self);
-static void     gtk_assert_dialog_class_init        (GtkAssertDialogClass *klass);
+extern "C" {
+static void gtk_assert_dialog_init(GTypeInstance* instance, void*);
+}
 
 GType gtk_assert_dialog_get_type()
 {
@@ -240,12 +245,12 @@ GType gtk_assert_dialog_get_type()
             sizeof (GtkAssertDialogClass),
             NULL,           /* base_init */
             NULL,           /* base_finalize */
-            (GClassInitFunc) gtk_assert_dialog_class_init,
+            NULL,
             NULL,           /* class_finalize */
             NULL,           /* class_data */
             sizeof (GtkAssertDialog),
             16,             /* n_preallocs */
-            (GInstanceInitFunc) gtk_assert_dialog_init,
+            gtk_assert_dialog_init,
             NULL
         };
         assert_dialog_type = g_type_register_static (GTK_TYPE_DIALOG, "GtkAssertDialog", &assert_dialog_info, (GTypeFlags)0);
@@ -254,13 +259,10 @@ GType gtk_assert_dialog_get_type()
     return assert_dialog_type;
 }
 
-static void gtk_assert_dialog_class_init(GtkAssertDialogClass*)
-{
-    /* no special initializations required */
-}
-
-static void gtk_assert_dialog_init(GtkAssertDialog* dlg)
+extern "C" {
+static void gtk_assert_dialog_init(GTypeInstance* instance, void*)
 {
+    GtkAssertDialog* dlg = GTK_ASSERT_DIALOG(instance);
     GtkWidget *continuebtn;
 
     {
@@ -368,6 +370,7 @@ static void gtk_assert_dialog_init(GtkAssertDialog* dlg)
     gtk_widget_pop_composite_child ();
     gtk_widget_show_all (GTK_WIDGET(dlg));
 }
+}
 
 /* ----------------------------------------------------------------------------
    GtkAssertDialog public API
@@ -429,6 +432,8 @@ gchar *gtk_assert_dialog_get_backtrace (GtkAssertDialog *dlg)
     return g_string_free (string, FALSE);
 }
 
+#endif // wxUSE_STACKWALKER
+
 void gtk_assert_dialog_set_message(GtkAssertDialog *dlg, const gchar *msg)
 {
     /* prepend and append the <b> tag
@@ -444,6 +449,8 @@ void gtk_assert_dialog_set_message(GtkAssertDialog *dlg, const gchar *msg)
     g_free (escaped_msg);
 }
 
+#if wxUSE_STACKWALKER
+
 void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg,
                                               GtkAssertDialogStackFrameCallback callback,
                                               void *userdata)