summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gsearchtool/gsearchtool-callbacks.c26
-rw-r--r--gsearchtool/gsearchtool.c6
-rw-r--r--gsearchtool/libmateui-deprecated/gsearchtool-entry.c16
3 files changed, 34 insertions, 14 deletions
diff --git a/gsearchtool/gsearchtool-callbacks.c b/gsearchtool/gsearchtool-callbacks.c
index 08d946be..6699a3b6 100644
--- a/gsearchtool/gsearchtool-callbacks.c
+++ b/gsearchtool/gsearchtool-callbacks.c
@@ -38,7 +38,11 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#include <gdk/gdkkeysyms-compat.h>
+#endif
#include "gsearchtool.h"
#include "gsearchtool-callbacks.h"
@@ -200,7 +204,7 @@ click_help_cb (GtkWidget * widget,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -365,7 +369,7 @@ display_dialog_file_open_limit (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
button = gtk_button_new_from_stock ("gtk-open");
gtk_widget_set_can_default (button, TRUE);
@@ -402,7 +406,7 @@ display_dialog_could_not_open_file (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -431,7 +435,7 @@ display_dialog_could_not_open_folder (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -562,7 +566,7 @@ display_dialog_folder_open_limit (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
button = gtk_button_new_from_stock ("gtk-open");
gtk_widget_set_can_default (button, TRUE);
@@ -707,7 +711,7 @@ display_dialog_could_not_move_to_trash (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -742,7 +746,7 @@ display_dialog_delete_permanently (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
button = gtk_button_new_from_stock ("gtk-delete");
gtk_widget_set_can_default (button, TRUE);
@@ -780,7 +784,7 @@ display_dialog_could_not_delete (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -1653,7 +1657,7 @@ display_dialog_could_not_save_no_name (GtkWidget * window)
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -1685,7 +1689,7 @@ display_dialog_could_not_save_to (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -1722,7 +1726,7 @@ display_dialog_could_not_save_exists (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
button = gsearchtool_button_new_with_stock_icon (_("_Replace"), GTK_STOCK_OK);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
diff --git a/gsearchtool/gsearchtool.c b/gsearchtool/gsearchtool.c
index 64e753d2..a3f973be 100644
--- a/gsearchtool/gsearchtool.c
+++ b/gsearchtool/gsearchtool.c
@@ -492,7 +492,7 @@ display_dialog_character_set_conversion_error (GtkWidget * window,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -1860,7 +1860,7 @@ spawn_search_command (GSearchWindow * gsearch,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -1892,7 +1892,7 @@ spawn_search_command (GSearchWindow * gsearch,
gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
diff --git a/gsearchtool/libmateui-deprecated/gsearchtool-entry.c b/gsearchtool/libmateui-deprecated/gsearchtool-entry.c
index cd665a24..4916865a 100644
--- a/gsearchtool/libmateui-deprecated/gsearchtool-entry.c
+++ b/gsearchtool/libmateui-deprecated/gsearchtool-entry.c
@@ -111,12 +111,20 @@ gsearch_history_entry_get_property (GObject *object,
}
static void
+#if GTK_CHECK_VERSION (3, 0, 0)
+gsearch_history_entry_destroy (GtkWidget *object)
+#else
gsearch_history_entry_destroy (GtkObject *object)
+#endif
{
gsearch_history_entry_set_enable_completion (GSEARCH_HISTORY_ENTRY (object),
FALSE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GTK_WIDGET_CLASS (gsearch_history_entry_parent_class)->destroy (object);
+#else
GTK_OBJECT_CLASS (gsearch_history_entry_parent_class)->destroy (object);
+#endif
}
static void
@@ -141,12 +149,20 @@ static void
gsearch_history_entry_class_init (GsearchHistoryEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS (klass);
+#else
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
+#endif
object_class->set_property = gsearch_history_entry_set_property;
object_class->get_property = gsearch_history_entry_get_property;
object_class->finalize = gsearch_history_entry_finalize;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtkwidget_class->destroy = gsearch_history_entry_destroy;
+#else
gtkobject_class->destroy = gsearch_history_entry_destroy;
+#endif
g_object_class_install_property (object_class,
PROP_HISTORY_ID,