add wrappers to avoid compiling code which will never be used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,7 +9,8 @@
|
|||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/platform.h"
|
#if wxDEBUG_LEVEL
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "wx/gtk/assertdlg_gtk.h"
|
#include "wx/gtk/assertdlg_gtk.h"
|
||||||
#include "wx/gtk/private/gtk2-compat.h"
|
#include "wx/gtk/private/gtk2-compat.h"
|
||||||
@@ -63,6 +64,8 @@ GtkWidget *gtk_assert_dialog_add_button (GtkAssertDialog *dlg, const gchar *labe
|
|||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_STACKWALKER
|
||||||
|
|
||||||
void gtk_assert_dialog_append_text_column (GtkWidget *treeview, const gchar *name, int index)
|
void gtk_assert_dialog_append_text_column (GtkWidget *treeview, const gchar *name, int index)
|
||||||
{
|
{
|
||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
@@ -204,7 +207,11 @@ static void gtk_assert_dialog_copy_callback(GtkWidget*, GtkAssertDialog* dlg)
|
|||||||
g_free (backtrace);
|
g_free (backtrace);
|
||||||
g_string_free (str, TRUE);
|
g_string_free (str, TRUE);
|
||||||
}
|
}
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
|
#endif // wxUSE_STACKWALKER
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
static void gtk_assert_dialog_continue_callback(GtkWidget*, GtkAssertDialog* dlg)
|
static void gtk_assert_dialog_continue_callback(GtkWidget*, GtkAssertDialog* dlg)
|
||||||
{
|
{
|
||||||
gint response =
|
gint response =
|
||||||
@@ -293,13 +300,15 @@ static void gtk_assert_dialog_init(GtkAssertDialog* dlg)
|
|||||||
gtk_box_pack_end (GTK_BOX(vbox2), GTK_WIDGET(dlg->message), TRUE, TRUE, 8);
|
gtk_box_pack_end (GTK_BOX(vbox2), GTK_WIDGET(dlg->message), TRUE, TRUE, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_STACKWALKER
|
||||||
/* add the expander */
|
/* add the expander */
|
||||||
dlg->expander = gtk_expander_new_with_mnemonic ("Back_trace:");
|
dlg->expander = gtk_expander_new_with_mnemonic ("Back_trace:");
|
||||||
gtk_box_pack_start (GTK_BOX(vbox), dlg->expander, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX(vbox), dlg->expander, TRUE, TRUE, 0);
|
||||||
g_signal_connect (dlg->expander, "activate",
|
g_signal_connect (dlg->expander, "activate",
|
||||||
G_CALLBACK(gtk_assert_dialog_expander_callback), dlg);
|
G_CALLBACK(gtk_assert_dialog_expander_callback), dlg);
|
||||||
|
#endif // wxUSE_STACKWALKER
|
||||||
}
|
}
|
||||||
|
#if wxUSE_STACKWALKER
|
||||||
{
|
{
|
||||||
GtkWidget *hbox, *vbox, *button, *sw;
|
GtkWidget *hbox, *vbox, *button, *sw;
|
||||||
|
|
||||||
@@ -334,6 +343,7 @@ static void gtk_assert_dialog_init(GtkAssertDialog* dlg)
|
|||||||
GTK_STOCK_COPY);
|
GTK_STOCK_COPY);
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK(gtk_assert_dialog_copy_callback), dlg);
|
g_signal_connect (button, "clicked", G_CALLBACK(gtk_assert_dialog_copy_callback), dlg);
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_STACKWALKER
|
||||||
|
|
||||||
/* add the checkbutton */
|
/* add the checkbutton */
|
||||||
dlg->shownexttime = gtk_check_button_new_with_mnemonic("Show this _dialog the next time");
|
dlg->shownexttime = gtk_check_button_new_with_mnemonic("Show this _dialog the next time");
|
||||||
@@ -372,6 +382,8 @@ gchar *gtk_assert_dialog_get_message (GtkAssertDialog *dlg)
|
|||||||
return g_strdup (gtk_label_get_text (GTK_LABEL(dlg->message)));
|
return g_strdup (gtk_label_get_text (GTK_LABEL(dlg->message)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_STACKWALKER
|
||||||
|
|
||||||
gchar *gtk_assert_dialog_get_backtrace (GtkAssertDialog *dlg)
|
gchar *gtk_assert_dialog_get_backtrace (GtkAssertDialog *dlg)
|
||||||
{
|
{
|
||||||
gchar *function, *sourcefile, *linenum;
|
gchar *function, *sourcefile, *linenum;
|
||||||
@@ -472,9 +484,13 @@ void gtk_assert_dialog_append_stack_frame(GtkAssertDialog *dlg,
|
|||||||
g_string_free (linenum, TRUE);
|
g_string_free (linenum, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_STACKWALKER
|
||||||
|
|
||||||
GtkWidget *gtk_assert_dialog_new(void)
|
GtkWidget *gtk_assert_dialog_new(void)
|
||||||
{
|
{
|
||||||
void* dialog = g_object_new(GTK_TYPE_ASSERT_DIALOG, NULL);
|
void* dialog = g_object_new(GTK_TYPE_ASSERT_DIALOG, NULL);
|
||||||
|
|
||||||
return GTK_WIDGET (dialog);
|
return GTK_WIDGET (dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxDEBUG_LEVEL
|
||||||
|
Reference in New Issue
Block a user