[Xfce4-commits] [apps/mousepad] 01/10: Clear G(D|T)K_DISABLE_DEPRECATED build failures

noreply at xfce.org noreply at xfce.org
Sat Jul 19 13:47:10 CEST 2014


This is an automated email from the git hooks/post-receive script.

mbrush pushed a commit to branch master
in repository apps/mousepad.

commit 79afcb0967c892107b48b5d1fa6d9779310fbf42
Author: Matthew Brush <mbrush at codebrainz.ca>
Date:   Tue Jul 15 20:36:52 2014 -0700

    Clear G(D|T)K_DISABLE_DEPRECATED build failures
    
    Add a mousepad-gtkcompat.h to add GTK+ 2/3 compatibility code to.
---
 mousepad/mousepad-gtkcompat.h      |   11 +++++++++++
 mousepad/mousepad-replace-dialog.c |    9 +++++----
 mousepad/mousepad-window.c         |    2 +-
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/mousepad/mousepad-gtkcompat.h b/mousepad/mousepad-gtkcompat.h
new file mode 100644
index 0000000..db1857b
--- /dev/null
+++ b/mousepad/mousepad-gtkcompat.h
@@ -0,0 +1,11 @@
+#ifndef __MOUSEPAD_GTK_COMPAT_H__
+#define __MOUSEPAD_GTK_COMPAT_H__ 1
+
+#include <gtk/gtk.h>
+
+#if ! GTK_CHECK_VERSION(2, 24, 0)
+# define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
+# define gtk_combo_box_text_new            gtk_combo_box_new_text
+#endif
+
+#endif /* __MOUSEPAD_GTK_COMPAT_H__ */
diff --git a/mousepad/mousepad-replace-dialog.c b/mousepad/mousepad-replace-dialog.c
index b5edfe8..6f20d39 100644
--- a/mousepad/mousepad-replace-dialog.c
+++ b/mousepad/mousepad-replace-dialog.c
@@ -21,6 +21,7 @@
 #include <mousepad/mousepad-dialogs.h>
 #include <mousepad/mousepad-util.h>
 #include <mousepad/mousepad-marshal.h>
+#include <mousepad/mousepad-gtkcompat.h>
 
 
 
@@ -164,7 +165,7 @@ mousepad_replace_dialog_init (MousepadReplaceDialog *dialog)
   gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_entry_new_text ();
+  combo = gtk_combo_box_text_new_with_entry ();
   mousepad_replace_dialog_history_combo_box (GTK_COMBO_BOX (combo));
   gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL(label), combo);
@@ -185,7 +186,7 @@ mousepad_replace_dialog_init (MousepadReplaceDialog *dialog)
   gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_entry_new_text ();
+  combo = gtk_combo_box_text_new_with_entry ();
   mousepad_replace_dialog_history_combo_box (GTK_COMBO_BOX (combo));
   gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
   gtk_widget_show (combo);
@@ -205,7 +206,7 @@ mousepad_replace_dialog_init (MousepadReplaceDialog *dialog)
   gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_new_text ();
+  combo = gtk_combo_box_text_new ();
   gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL(label), combo);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Up"));
@@ -243,7 +244,7 @@ mousepad_replace_dialog_init (MousepadReplaceDialog *dialog)
 
   mousepad_replace_dialog_bind_setting (dialog, MOUSEPAD_SETTING_SEARCH_REPLACE_ALL, check, "active");
 
-  combo = dialog->search_location_combo = gtk_combo_box_new_text ();
+  combo = dialog->search_location_combo = gtk_combo_box_text_new ();
   gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Selection"));
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Document"));
diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index 30f90c1..139299f 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -4622,7 +4622,7 @@ mousepad_window_action_find (GtkAction      *action,
     }
 
   /* set the search entry text if the search bar is hidden*/
-  if (GTK_WIDGET_VISIBLE (window->search_bar) == FALSE)
+  if (gtk_widget_get_visible (window->search_bar) == FALSE)
     {
       if (gtk_text_buffer_get_has_selection (window->active->buffer) == TRUE)
         {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list