Author: rpmcruz
Date: Tue Jan 13 16:59:38 2009
New Revision: 54592
URL: http://svn.opensuse.org/viewcvs/yast?rev=54592&view=rev
Log:
* src/YGComboBox.cc: porting over a fix for active_text.
Modified:
branches/SuSE-Linux-11_0-Branch/gtk/ChangeLog
branches/SuSE-Linux-11_0-Branch/gtk/src/YGComboBox.cc
Modified: branches/SuSE-Linux-11_0-Branch/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/gtk/ChangeLog?rev=54592&r1=54591&r2=54592&view=diff
==============================================================================
--- branches/SuSE-Linux-11_0-Branch/gtk/ChangeLog (original)
+++ branches/SuSE-Linux-11_0-Branch/gtk/ChangeLog Tue Jan 13 16:59:38 2009
@@ -1,3 +1,7 @@
+2009-01-13 Ricardo Cruz
+
+ * src/YGComboBox.cc: porting over a fix for active_text.
+
2009-01-08 Ricardo Cruz
* src/YGPackageSelector.cc: bug fix 449306: crash on conflict dialog.
Modified: branches/SuSE-Linux-11_0-Branch/gtk/src/YGComboBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/gtk/src/YGComboBox.cc?rev=54592&r1=54591&r2=54592&view=diff
==============================================================================
--- branches/SuSE-Linux-11_0-Branch/gtk/src/YGComboBox.cc (original)
+++ branches/SuSE-Linux-11_0-Branch/gtk/src/YGComboBox.cc Tue Jan 13 16:59:38 2009
@@ -65,7 +65,22 @@
virtual string text()
{
- return gtk_combo_box_get_active_text (getComboBox());
+ gchar *str = 0;
+ if (GTK_IS_COMBO_BOX_ENTRY (getWidget()))
+ str = gtk_combo_box_get_active_text (getComboBox());
+ else {
+ GtkTreeIter iter;
+ if (gtk_combo_box_get_active_iter (getComboBox(), &iter)) {
+ gchar *str = 0;
+ gtk_tree_model_get (getModel(), &iter, LABEL_COLUMN, &str, -1);
+ }
+ }
+ std::string ret;
+ if (str) {
+ ret = str;
+ g_free (str);
+ }
+ return ret;
}
virtual void setText (const string &value)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org