[gnome-commander] Adds new combo creation function for recent gtk version
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Adds new combo creation function for recent gtk version
- Date: Mon, 26 Sep 2016 21:36:41 +0000 (UTC)
commit ee8c48edccffd4aa72509a4db8f6ae0f3c89f4b0
Author: Uwe Scholz <uwescholz src gnome org>
Date: Sun Sep 25 22:18:42 2016 +0200
Adds new combo creation function for recent gtk version
libgcmd/libgcmd-widget-factory.cc | 10 +++++++++-
libgcmd/libgcmd-widget-factory.h | 2 ++
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/libgcmd/libgcmd-widget-factory.cc b/libgcmd/libgcmd-widget-factory.cc
index c425e22..db4d4cf 100644
--- a/libgcmd/libgcmd-widget-factory.cc
+++ b/libgcmd/libgcmd-widget-factory.cc
@@ -422,7 +422,7 @@ GtkWidget *create_hbuttonbox (GtkWidget *parent)
return w;
}
-
+//deprecated since GTK2.4
GtkWidget *create_combo (GtkWidget *parent)
{
GtkWidget *combo = gtk_combo_new ();
@@ -432,6 +432,14 @@ GtkWidget *create_combo (GtkWidget *parent)
return combo;
}
+GtkWidget *create_combo_new (GtkWidget *parent)
+{
+ GtkWidget *combo = gtk_combo_box_text_new_with_entry ();
+ g_object_ref (combo);
+ g_object_set_data_full (G_OBJECT (parent), "combo", combo, g_object_unref);
+ gtk_widget_show (combo);
+ return combo;
+}
GtkWidget *create_option_menu (GtkWidget *parent, const gchar **items)
{
diff --git a/libgcmd/libgcmd-widget-factory.h b/libgcmd/libgcmd-widget-factory.h
index 92f175b..f1c1f06 100644
--- a/libgcmd/libgcmd-widget-factory.h
+++ b/libgcmd/libgcmd-widget-factory.h
@@ -124,6 +124,8 @@ GtkWidget *create_hbuttonbox (GtkWidget *parent);
GtkWidget *create_combo (GtkWidget *parent);
+GtkWidget *create_combo_new (GtkWidget *parent);
+
GtkWidget *create_option_menu (GtkWidget *parent, const gchar **items);
inline const gchar *get_combo_text (GtkWidget *combo)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]