Author: rpmcruz Date: Mon Jun 2 16:56:17 2008 New Revision: 47993 URL: http://svn.opensuse.org/viewcvs/yast?rev=47993&view=rev Log: * src/YGComboBox.cc: fixed bug 394309: GTK returning null for active text. * src/YGWidget.cc (doSetEnabled): also disable the label, to give a better look. * src/ygtkwizard.c: let the side pane shrink. Modified: trunk/gtk/ChangeLog trunk/gtk/src/YGComboBox.cc trunk/gtk/src/YGFrame.cc trunk/gtk/src/YGWidget.cc trunk/gtk/src/ygtkwizard.c Modified: trunk/gtk/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=47993&r1=47992&r2=47993&view=diff ============================================================================== --- trunk/gtk/ChangeLog (original) +++ trunk/gtk/ChangeLog Mon Jun 2 16:56:17 2008 @@ -9,6 +9,14 @@ * src/ygtkratiobox.h/.c: simplified it. + * src/YGComboBox.cc: fixed bug 394309: GTK returning null for + active text. + + * src/YGWidget.cc (doSetEnabled): also disable the label, to + give a better look. + + * src/ygtkwizard.c: let the side pane shrink. + 2008-05-28 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> * src/YGDialog.cc: bug fix: seems like we shouldn't unref the Modified: trunk/gtk/src/YGComboBox.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGComboBox.cc?rev=47993&r1=47992&r2=47993&view=diff ============================================================================== --- trunk/gtk/src/YGComboBox.cc (original) +++ trunk/gtk/src/YGComboBox.cc Mon Jun 2 16:56:17 2008 @@ -65,7 +65,12 @@ virtual string text() { - return gtk_combo_box_get_active_text (getComboBox()); + gchar *str = gtk_combo_box_get_active_text (getComboBox()); + std::string ret; + if (str) + ret = str; + g_free (str); + return ret; } virtual void setText (const string &value) Modified: trunk/gtk/src/YGFrame.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGFrame.cc?rev=47993&r1=47992&r2=47993&view=diff ============================================================================== --- trunk/gtk/src/YGFrame.cc (original) +++ trunk/gtk/src/YGFrame.cc Mon Jun 2 16:56:17 2008 @@ -9,7 +9,7 @@ // Instead of traditional looking frames, we use Gnome convention for the // frame's look. That is: don't draw a frame, use bold header and pad the child. -#define CHILD_INDENTATION 15 +#define CHILD_INDENTATION 20 class YGBaseFrame : public YGWidget { @@ -24,7 +24,8 @@ { IMPL m_containee = gtk_alignment_new (0, 0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (m_containee), 0, 0, 15, 0); + gtk_alignment_set_padding (GTK_ALIGNMENT (m_containee), + 0, 0, CHILD_INDENTATION, 0); gtk_widget_show (m_containee); gtk_container_add (GTK_CONTAINER (getWidget()), m_containee); } @@ -101,7 +102,7 @@ YGWIDGET_IMPL_COMMON YGWIDGET_IMPL_CHILD_ADDED (m_containee) - YGWIDGET_IMPL_CHILD_REMOVED (getWidget()) + YGWIDGET_IMPL_CHILD_REMOVED (m_containee) }; @@ -122,7 +123,7 @@ { IMPL GtkWidget *button = gtk_check_button_new_with_mnemonic(""); - YGUtils::setWidgetFont (GTK_WIDGET (button), PANGO_WEIGHT_BOLD, + YGUtils::setWidgetFont (gtk_bin_get_child (GTK_BIN (button)), PANGO_WEIGHT_BOLD, PANGO_SCALE_MEDIUM); gtk_widget_show_all (button); gtk_frame_set_label_widget (GTK_FRAME (getWidget()), button); @@ -157,9 +158,8 @@ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), value); } - virtual void setEnabled (bool enabled) - { - + virtual void doSetEnabled (bool enabled) + { GtkWidget *frame = getWidget(); if (enabled) { gtk_widget_set_sensitive (frame, TRUE); @@ -172,8 +172,9 @@ YWidget::setEnabled (enabled); } + YGWIDGET_IMPL_COMMON YGWIDGET_IMPL_CHILD_ADDED (m_containee) - YGWIDGET_IMPL_CHILD_REMOVED (getWidget()) + YGWIDGET_IMPL_CHILD_REMOVED (m_containee) private: static void toggled_cb (GtkWidget *widget, YGCheckBoxFrame *pThis) Modified: trunk/gtk/src/YGWidget.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGWidget.cc?rev=47993&r1=47992&r2=47993&view=diff ============================================================================== --- trunk/gtk/src/YGWidget.cc (original) +++ trunk/gtk/src/YGWidget.cc Mon Jun 2 16:56:17 2008 @@ -83,7 +83,7 @@ void YGWidget::doSetEnabled (bool enabled) { - gtk_widget_set_sensitive (getWidget(), enabled); + gtk_widget_set_sensitive (getLayout(), enabled); } void YGWidget::doSetUseBoldFont (bool useBold) Modified: trunk/gtk/src/ygtkwizard.c URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkwizard.c?rev=47993&r1=47992&r2=47993&view=diff ============================================================================== --- trunk/gtk/src/ygtkwizard.c (original) +++ trunk/gtk/src/ygtkwizard.c Mon Jun 2 16:56:17 2008 @@ -490,7 +490,7 @@ GtkWidget *child = wizard->m_child, *pane; pane = gtk_hpaned_new(); - gtk_paned_pack1 (GTK_PANED (pane), wizard->m_tree, TRUE, FALSE); + gtk_paned_pack1 (GTK_PANED (pane), wizard->m_tree, TRUE, TRUE); gtk_widget_show_all (pane); ygtk_wizard_set_child (wizard, pane); wizard->m_pane = pane; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org