Author: rpmcruz
Date: Fri Nov 28 21:38:52 2008
New Revision: 53751
URL: http://svn.opensuse.org/viewcvs/yast?rev=53751&view=rev
Log:
* src/YGDialog.cc: export setTitle() to C code.
* src/ygtklinklabel.c: bug fix 449194: "more" link was disapearing on unmap.
Not sure why but showing it on map was causing glitches.
Just force a resize.
* src/ygtkwizard.c: bug fix 449194: update the window title on map (when the
wizard is swapped in).
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGDialog.cc
trunk/gtk/src/ygtklinklabel.c
trunk/gtk/src/ygtkwizard.c
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=53751&r1=53750&r2=53751&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Fri Nov 28 21:38:52 2008
@@ -38,6 +38,13 @@
Arabic in a paragraph per paragraph basis. Work around it so the entire
text, including the English parts, are aligned to the right.
+ * src/YGDialog.cc: export setTitle() to C code.
+ * src/ygtklinklabel.c: bug fix 449194: "more" link was disapearing on unmap.
+ Not sure why but showing it on map was causing glitches.
+ Just force a resize.
+ * src/ygtkwizard.c: bug fix 449194: update the window title on map (when the
+ wizard is swapped in).
+
2008-11-23 Ricardo Cruz
* src/ygtkwizard.c: don't show "more" link on help line if the rest
Modified: trunk/gtk/src/YGDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.cc?rev=53751&r1=53750&r2=53751&view=diff
==============================================================================
--- trunk/gtk/src/YGDialog.cc (original)
+++ trunk/gtk/src/YGDialog.cc Fri Nov 28 21:38:52 2008
@@ -537,6 +537,15 @@
present();
}
+extern "C" {
+ void ygdialog_setTitle (const gchar *title, gboolean sticky);
+};
+
+void ygdialog_setTitle (const gchar *title, gboolean sticky)
+{
+ YGDialog::currentDialog()->setTitle (title, sticky);
+}
+
void YGDialog::setIcon (const std::string &icon)
{
GtkWindow *window = GTK_WINDOW (m_window->getWidget());
Modified: trunk/gtk/src/ygtklinklabel.c
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtklinklabel.c?rev=53751&r1=53750&r2=53751&view=diff
==============================================================================
--- trunk/gtk/src/ygtklinklabel.c (original)
+++ trunk/gtk/src/ygtklinklabel.c Fri Nov 28 21:38:52 2008
@@ -55,6 +55,14 @@
GTK_WIDGET_CLASS (ygtk_link_label_parent_class)->unrealize (widget);
}
+static void ygtk_link_label_map (GtkWidget *widget)
+{
+ // "more" hides on unmap and for some reason showing it clears the
+ // text...
+ gtk_widget_queue_resize (widget);
+ GTK_WIDGET_CLASS (ygtk_link_label_parent_class)->map (widget);
+}
+
static void ygtk_link_label_clear_layout (YGtkLinkLabel *label)
{
if (label->layout) {
@@ -210,6 +218,7 @@
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
widget_class->realize = ygtk_link_label_realize;
widget_class->unrealize = ygtk_link_label_unrealize;
+ widget_class->map = ygtk_link_label_map;
widget_class->size_request = ygtk_link_label_size_request;
widget_class->size_allocate = ygtk_link_label_size_allocate;
widget_class->expose_event = ygtk_link_label_expose_event;
Modified: trunk/gtk/src/ygtkwizard.c
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkwizard.c?rev=53751&r1=53750&r2=53751&view=diff
==============================================================================
--- trunk/gtk/src/ygtkwizard.c (original)
+++ trunk/gtk/src/ygtkwizard.c Fri Nov 28 21:38:52 2008
@@ -30,6 +30,7 @@
extern gboolean ygutils_setStockIcon (GtkWidget *button, const char *label,
const char *fallbackIcon);
extern GdkPixbuf *ygutils_setOpacity (const GdkPixbuf *src, int opacity, gboolean alpha);
+extern void ygdialog_setTitle (const gchar *title, gboolean sticky);
//** YGtkHelpDialog
@@ -703,6 +704,16 @@
gtk_widget_grab_focus (wizard->next_button);
}
+static void ygtk_wizard_map (GtkWidget *widget)
+{
+ GTK_WIDGET_CLASS (ygtk_wizard_parent_class)->map (widget);
+ // since wizards can swap the window, we need to update the title on map
+ YGtkWizard *wizard = YGTK_WIZARD (widget);
+ YGtkWizardHeader *header = YGTK_WIZARD_HEADER (wizard->m_title);
+ const gchar *title = gtk_label_get_text (GTK_LABEL (header->title));
+ ygdialog_setTitle (title, FALSE);
+}
+
static gboolean clear_hash_cb (gpointer key, gpointer value, gpointer data)
{ return TRUE; }
static void clear_hash (GHashTable *hash_table)
@@ -1116,6 +1127,7 @@
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS (klass);
widget_class->realize = ygtk_wizard_realize;
+ widget_class->map = ygtk_wizard_map;
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
gtkobject_class->destroy = ygtk_wizard_destroy;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org