[nautilus-actions] Deprecated GtkComboBoxEntry: use GTK_CHECK_VERSION macro
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Deprecated GtkComboBoxEntry: use GTK_CHECK_VERSION macro
- Date: Sun, 2 Jan 2011 14:09:20 +0000 (UTC)
commit 55e9b148b86c75776e98bfe46d4e16bfdfed9b05
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Jan 2 14:54:20 2011 +0100
Deprecated GtkComboBoxEntry: use GTK_CHECK_VERSION macro
ChangeLog | 4 +++-
src/nact/nact-gtk-utils.c | 10 +++++-----
src/nact/nact-iaction-tab.c | 8 +++++++-
3 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f22093d..3f618fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,7 +10,9 @@
* src/nact/nact-add-scheme-dialog.c:
* src/nact/nact-main-tab.c:
* src/nact/nact-clipboard.c:
- * src/nact/nact-tree-model-dnd.c: Use GTK_CHECK_VERSION macro.
+ * src/nact/nact-tree-model-dnd.c:
+ * src/nact/nact-gtk-utils.c:
+ * src/nact/nact-iaction-tab.c: Use GTK_CHECK_VERSION macro.
* configure.ac:
* m4/na-check-for-gtk.m4:
diff --git a/src/nact/nact-gtk-utils.c b/src/nact/nact-gtk-utils.c
index 7990f87..c1d4c49 100644
--- a/src/nact/nact-gtk-utils.c
+++ b/src/nact/nact-gtk-utils.c
@@ -62,11 +62,11 @@ nact_gtk_utils_set_editable( GObject *widget, gboolean editable )
{
GList *renderers, *irender;
- /* GtkComboBoxEntry is deprecated from Gtk+3
- * see. http://git.gnome.org/browse/gtk+/commit/?id=9612c648176378bf237ad0e1a8c6c995b0ca7c61
- * while 'has_entry' property exists since 2.24
- */
-#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION >= 3 )
+/* GtkComboBoxEntry is deprecated from Gtk+3
+ * see. http://git.gnome.org/browse/gtk+/commit/?id=9612c648176378bf237ad0e1a8c6c995b0ca7c61
+ * while 'has_entry' property exists since 2.24
+ */
+#if GTK_CHECK_VERSION( 2, 24, 0 )
if( GTK_IS_COMBO_BOX( widget ) && gtk_combo_box_get_has_entry( GTK_COMBO_BOX( widget ))){
#else
if( GTK_IS_COMBO_BOX_ENTRY( widget )){
diff --git a/src/nact/nact-iaction-tab.c b/src/nact/nact-iaction-tab.c
index 1d5c6c9..40ae1b7 100644
--- a/src/nact/nact-iaction-tab.c
+++ b/src/nact/nact-iaction-tab.c
@@ -220,12 +220,18 @@ nact_iaction_tab_initial_load_toplevel( NactIActionTab *instance )
gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
model = create_stock_icon_model();
-#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION >= 3 )
+
+/* GtkComboBoxEntry is deprecated from Gtk+3
+ * see. http://git.gnome.org/browse/gtk+/commit/?id=9612c648176378bf237ad0e1a8c6c995b0ca7c61
+ * while 'has_entry' property exists since 2.24
+ */
+#if GTK_CHECK_VERSION( 2, 24, 0 )
icon_combo = gtk_combo_box_new_with_model_and_entry( model );
gtk_combo_box_set_entry_text_column( GTK_COMBO_BOX( icon_combo ), ICON_STOCK_COLUMN );
#else
icon_combo = gtk_combo_box_entry_new_with_model( model, ICON_STOCK_COLUMN );
#endif
+
icon_combo_list_set_layout( GTK_COMBO_BOX( icon_combo ));
g_object_unref( model );
container = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconHBox" );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]