Author: rpmcruz
Date: Sun Aug 31 03:00:44 2008
New Revision: 50506
URL: http://svn.opensuse.org/viewcvs/yast?rev=50506&view=rev
Log:
* src/ygtkwizard.c: use the proper image API so the help icon gets
aligned next to the label.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGUtils.cc
trunk/gtk/src/ygtkwizard.c
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=50506&r1=50505&r2=50506&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Aug 31 03:00:44 2008
@@ -1,4 +1,4 @@
-2008-08-20 Ricardo Cruz
+2008-08-30 Ricardo Cruz
* src/YGUtils.cc: stock exceptions for the media labels.
@@ -6,6 +6,9 @@
* src/YGRadioButton.cc: set border.
+ * src/ygtkwizard.c: use the proper image API so the help icon gets
+ aligned next to the label.
+
2008-08-29 Ricardo Cruz
* src/YGLayout.cc: implemented new libyui widget YButtonBox, making
Modified: trunk/gtk/src/YGUtils.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUtils.cc?rev=50506&r1=50505&r2=50506&view=diff
==============================================================================
--- trunk/gtk/src/YGUtils.cc (original)
+++ trunk/gtk/src/YGUtils.cc Sun Aug 31 03:00:44 2008
@@ -529,16 +529,8 @@
it = stockMap.find (id);
if (it != stockMap.end()) {
const std::string &stock_id = it->second;
- GdkPixbuf *pixbuf;
- pixbuf = gtk_widget_render_icon (button, stock_id.c_str(), GTK_ICON_SIZE_BUTTON, NULL);
- if (pixbuf) {
- GtkWidget *image = gtk_image_new_from_pixbuf (pixbuf);
- gtk_button_set_image (GTK_BUTTON (button), image);
- g_object_unref (G_OBJECT (pixbuf));
- }
- else
- g_warning ("yast2-gtk: setStockIcon(): id '%s' exists, but has no pixbuf",
- stock_id.c_str());
+ GtkWidget *image = gtk_image_new_from_stock (stock_id.c_str(), GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (button), image);
}
else
gtk_button_set_image (GTK_BUTTON (button), NULL);
Modified: trunk/gtk/src/ygtkwizard.c
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkwizard.c?rev=50506&r1=50505&r2=50506&view=diff
==============================================================================
--- trunk/gtk/src/ygtkwizard.c (original)
+++ trunk/gtk/src/ygtkwizard.c Sun Aug 31 03:00:44 2008
@@ -373,15 +373,12 @@
static GtkWidget *create_help_button()
{
- GtkWidget *button, *box, *image;
- box = gtk_hbox_new (FALSE, 6);
+ GtkWidget *button, *image;
image = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (box), gtk_label_new (_("Help")), TRUE, TRUE, 0);
- gtk_widget_show_all (box);
button = gtk_toggle_button_new();
+ gtk_button_set_label (GTK_BUTTON (button), _("Help"));
+ gtk_button_set_image (GTK_BUTTON (button), image);
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
- gtk_container_add (GTK_CONTAINER (button), box);
return button;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org