Mailinglist Archive: yast-commit (1771 mails)

< Previous Next >
[yast-commit] r58483 - in /trunk/gtk: ChangeLog src/YGUtils.cc src/ygtksteps.c src/ygtkwizard.c
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Thu, 03 Sep 2009 03:03:31 -0000
  • Message-id: <E1Mj2bj-0006g9-3N@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Thu Sep 3 05:03:30 2009
New Revision: 58483

URL: http://svn.opensuse.org/viewcvs/yast?rev=58483&view=rev
Log:
* src/ygtksteps.c: bug fix 471059: ignore style: force black
color on the text (since our background is white).

* src/ygtkwizard.c: use stock image for help button: copes
with style change.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGUtils.cc
trunk/gtk/src/ygtksteps.c
trunk/gtk/src/ygtkwizard.c

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=58483&r1=58482&r2=58483&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Thu Sep 3 05:03:30 2009
@@ -33,6 +33,12 @@
* src/YGUtils.cc: bug fix 446524: complement our label mapping
strategy with an array of translatable yast2 labels.

+ * src/ygtksteps.c: bug fix 471059: ignore style: force black
+ color on the text (since our background is white).
+
+ * src/ygtkwizard.c: use stock image for help button: copes
+ with style change.
+
2009-08-29 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* src/yzyppwrapper.h/.cc: split up Package::support()

Modified: trunk/gtk/src/YGUtils.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUtils.cc?rev=58483&r1=58482&r2=58483&view=diff
==============================================================================
--- trunk/gtk/src/YGUtils.cc (original)
+++ trunk/gtk/src/YGUtils.cc Thu Sep 3 05:03:30 2009
@@ -5,8 +5,9 @@
#define YUILogComponent "gtk"
#include <config.h>
#include <string.h>
-#include "YGUI.h"
#include "YGUtils.h"
+#include "YGUI.h"
+#include "YGi18n.h"

static inline void skipSpace (const char *instr, int *i)
{ while (g_ascii_isspace (instr[*i])) (*i)++; }

Modified: trunk/gtk/src/ygtksteps.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtksteps.c?rev=58483&r1=58482&r2=58483&view=diff
==============================================================================
--- trunk/gtk/src/ygtksteps.c (original)
+++ trunk/gtk/src/ygtksteps.c Thu Sep 3 05:03:30 2009
@@ -82,8 +82,10 @@

YGtkSteps *steps = YGTK_STEPS (widget);
gboolean reverse = gtk_widget_get_direction (widget) ==
GTK_TEXT_DIR_RTL;
- GtkStyle *style = gtk_widget_get_style (widget);
GList *children = gtk_container_get_children (GTK_CONTAINER (widget)),
*i;
+
+ cairo_t *cr = gdk_cairo_create (event->window);
+ cairo_set_source_rgb (cr, 0, 0, 0);
int n = 0;
for (i = children; i; i = i->next, n++) {
if (n <= steps->current_step) {
@@ -110,10 +112,12 @@
x += offset * (reverse ? 1 : -1);
}

- gtk_paint_layout (style, widget->window,
GTK_STATE_NORMAL, TRUE,
- NULL, /*event->area,*/ widget, NULL,
x, y, mark);
+
+ cairo_move_to (cr, x, y);
+ pango_cairo_show_layout (cr, mark);
}
}
+ cairo_destroy (cr);
g_list_free (children);
return FALSE;
}
@@ -126,6 +130,8 @@
gint ygtk_steps_append (YGtkSteps *steps, const gchar *text)
{
GtkWidget *label = gtk_label_new (text);
+ GdkColor black = { 0, 0, 0, 0 };
+ gtk_widget_modify_fg (label, GTK_STATE_NORMAL, &black);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
int mark_width = 10;
pango_layout_get_pixel_size (steps->check_mark_layout, &mark_width,
NULL);
@@ -138,6 +144,8 @@
void ygtk_steps_append_heading (YGtkSteps *steps, const gchar *heading)
{
GtkWidget *label = gtk_label_new (heading);
+ GdkColor black = { 0, 0, 0, 0 };
+ gtk_widget_modify_fg (label, GTK_STATE_NORMAL, &black);
g_object_set_data (G_OBJECT (label), "is-header", GINT_TO_POINTER (1));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);


Modified: trunk/gtk/src/ygtkwizard.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkwizard.c?rev=58483&r1=58482&r2=58483&view=diff
==============================================================================
--- trunk/gtk/src/ygtkwizard.c (original)
+++ trunk/gtk/src/ygtkwizard.c Thu Sep 3 05:03:30 2009
@@ -491,16 +491,12 @@

static GtkWidget *create_help_button()
{
- GtkWidget *button, *image = 0;
+ GtkWidget *button, *image;
button = gtk_toggle_button_new();
gtk_button_set_label (GTK_BUTTON (button), _("Help"));
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
- GdkPixbuf *pixbuf = gtk_widget_render_icon (button, GTK_STOCK_HELP,
GTK_ICON_SIZE_BUTTON, NULL);
- if (pixbuf) {
- image = gtk_image_new_from_pixbuf (pixbuf);
- g_object_unref (G_OBJECT (pixbuf));
- gtk_button_set_image (GTK_BUTTON (button), image);
- }
+ image = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (button), image);
return button;
}


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages