Author: rpmcruz
Date: Thu Oct 2 20:15:29 2008
New Revision: 51803
URL: http://svn.opensuse.org/viewcvs/yast?rev=51803&view=rev
Log:
* src/yzyppwrapper.cc: must update pools only after running the solver,
on finishTransactions().
* src/YGUI.cc: use libyui log system for all logs from gtk.
* src/ygtkwizard.c: reduced the size of the header font.
* src/YGDialog.cc: bug fix 428965: resize the window if too small.
* src/YGUtils.cc: bug fix 428193: set stock icon only if it exists.
* src/ygtkwizard.c: bug fix 428193: idem.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGDialog.cc
trunk/gtk/src/YGPackageSelector.cc
trunk/gtk/src/YGUI.cc
trunk/gtk/src/YGUtils.cc
trunk/gtk/src/ygtkwizard.c
trunk/gtk/src/yzyppwrapper.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=51803&r1=51802&r2=51803&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Thu Oct 2 20:15:29 2008
@@ -1,3 +1,17 @@
+2008-10-02 Ricardo Cruz
+
+ * src/yzyppwrapper.cc: must update pools only after running the solver,
+ on finishTransactions().
+
+ * src/YGUI.cc: use libyui log system for all logs from gtk.
+
+ * src/ygtkwizard.c: reduced the size of the header font.
+
+ * src/YGDialog.cc: bug fix 428965: resize the window if too small.
+
+ * src/YGUtils.cc: bug fix 428193: set stock icon only if it exists.
+ * src/ygtkwizard.c: bug fix 428193: idem.
+
2008-09-30 Ricardo Cruz
* src/ygtkbargraph.h/.c: replaced usage of deprecated GtkTooltips API
Modified: trunk/gtk/src/YGDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.cc?rev=51803&r1=51802&r2=51803&view=diff
==============================================================================
--- trunk/gtk/src/YGDialog.cc (original)
+++ trunk/gtk/src/YGDialog.cc Thu Oct 2 20:15:29 2008
@@ -410,7 +410,19 @@
GtkWidget *window = m_window->getWidget();
if (GTK_WIDGET_REALIZED (window)) {
gtk_widget_queue_resize (window);
- if (!isMainDialog())
+ bool resize = false;
+ if (isMainDialog()) {
+ width = MIN (0.95 * YUI::app()->displayWidth(), width);
+ height = MIN (0.95 * YUI::app()->displayWidth(), width);
+ if (window->allocation.width < width || window->allocation.height < height) {
+ width = MAX (width, window->allocation.width),
+ height = MAX (height, window->allocation.height);
+ resize = true;
+ }
+ }
+ else
+ resize = true;
+ if (resize)
gtk_window_resize (GTK_WINDOW (window), width, height);
}
}
Modified: trunk/gtk/src/YGPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev=51803&r1=51802&r2=51803&view=diff
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Thu Oct 2 20:15:29 2008
@@ -2493,12 +2493,7 @@
YGWidget (this, parent, true, YGTK_TYPE_WIZARD, NULL)
{
setBorder (0);
- GtkWindow *window = YGDialog::currentWindow();
- int enlarge_width = MIN (0.95 * YUI::app()->displayWidth(), 650);
- int enlarge_height = MIN (0.95 * YUI::app()->displayHeight(), 600);
- gtk_window_resize (window,
- MAX (enlarge_width, GTK_WIDGET (window)->allocation.width),
- MAX (enlarge_height, GTK_WIDGET (window)->allocation.height));
+ YGDialog::currentDialog()->setSize (650, 600); // enlarge
YGtkWizard *wizard = YGTK_WIZARD (getWidget());
ygtk_wizard_set_header_icon (wizard,
Modified: trunk/gtk/src/YGUI.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUI.cc?rev=51803&r1=51802&r2=51803&view=diff
==============================================================================
--- trunk/gtk/src/YGUI.cc (original)
+++ trunk/gtk/src/YGUI.cc Thu Oct 2 20:15:29 2008
@@ -79,7 +79,7 @@
default:
break;
}
- YUILog::instance()->log (ylevel, domain ? domain : "yast2-gtk", "", 0, "") << message;
+ YUILog::instance()->log (ylevel, domain ? domain : "yast2-gtk", "yast2-gtk", 0, "") << message;
}
void YGUI::checkInit()
@@ -131,11 +131,8 @@
gtk_init (&argc, &argv);
- // send logs to libyui logs
- g_log_set_handler ("Gtk", G_LOG_LEVEL_MASK, print_log, NULL);
- g_log_set_handler ("Pango", G_LOG_LEVEL_MASK, print_log, NULL);
- g_log_set_handler (NULL, G_LOG_LEVEL_MASK, print_log, NULL);
-#if 0 // to crash right away to get a stack trace
+ g_log_set_default_handler (print_log, NULL); // send gtk logs to libyui system
+#if 0 // to crash right away in order to get a stack trace
g_log_set_always_fatal (GLogLevelFlags (G_LOG_LEVEL_ERROR|G_LOG_LEVEL_CRITICAL|
G_LOG_LEVEL_WARNING| G_LOG_LEVEL_MESSAGE|G_LOG_LEVEL_INFO|G_LOG_LEVEL_DEBUG));
#endif
Modified: trunk/gtk/src/YGUtils.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUtils.cc?rev=51803&r1=51802&r2=51803&view=diff
==============================================================================
--- trunk/gtk/src/YGUtils.cc (original)
+++ trunk/gtk/src/YGUtils.cc Thu Oct 2 20:15:29 2008
@@ -451,7 +451,6 @@
PangoFontDescription* font = pango_font_description_new();
pango_font_description_set_weight (font, weight);
pango_font_description_set_size (font, (int)(size * scale));
-
gtk_widget_modify_font (widget, font);
pango_font_description_free (font);
}
@@ -535,8 +534,12 @@
else if (id.size() < 22)
icon = fallbackIcon;
if (icon) {
- GtkWidget *image = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (button), image);
+ GdkPixbuf *pixbuf = gtk_widget_render_icon (button, icon, GTK_ICON_SIZE_BUTTON, NULL);
+ if (pixbuf) {
+ GtkWidget *image = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (G_OBJECT (pixbuf));
+ gtk_button_set_image (GTK_BUTTON (button), image);
+ }
}
else {
GtkWidget *image = gtk_button_get_image (GTK_BUTTON (button));
Modified: trunk/gtk/src/ygtkwizard.c
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkwizard.c?rev=51803&r1=51802&r2=51803&view=diff
==============================================================================
--- trunk/gtk/src/ygtkwizard.c (original)
+++ trunk/gtk/src/ygtkwizard.c Thu Oct 2 20:15:29 2008
@@ -207,7 +207,7 @@
header->title = gtk_label_new (NULL);
gtk_label_set_ellipsize (GTK_LABEL (header->title), PANGO_ELLIPSIZE_END);
gtk_misc_set_alignment (GTK_MISC (header->title), 0, 0.5);
- ygutils_setWidgetFont (header->title, PANGO_WEIGHT_BOLD, PANGO_SCALE_XX_LARGE);
+ ygutils_setWidgetFont (header->title, PANGO_WEIGHT_BOLD, PANGO_SCALE_X_LARGE);
header->description = ygtk_link_label_new ("", _("more"));
g_signal_connect (G_OBJECT (header->description), "link-clicked",
@@ -215,7 +215,7 @@
header->icon = gtk_image_new();
- GtkWidget *text_box = gtk_vbox_new (FALSE, 1);
+ GtkWidget *text_box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (text_box), header->title, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (text_box), header->description, FALSE, TRUE, 0);
@@ -369,12 +369,16 @@
static GtkWidget *create_help_button()
{
- GtkWidget *button, *image;
- image = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_BUTTON);
+ GtkWidget *button, *image = 0;
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);
+ 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);
+ }
return button;
}
Modified: trunk/gtk/src/yzyppwrapper.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/yzyppwrapper.cc?rev=51803&r1=51802&r2=51803&view=diff
==============================================================================
--- trunk/gtk/src/yzyppwrapper.cc (original)
+++ trunk/gtk/src/yzyppwrapper.cc Thu Oct 2 20:15:29 2008
@@ -1994,10 +1994,6 @@
void Ypp::Impl::packageModified (Ypp::Package *package)
{
- // notify listeners of package change
- for (GSList *i = pkg_listeners; i; i = i->next)
- ((Pool::Impl *) i->data)->packageModified (package);
-
if (!g_slist_find (transactions, package)) /* could be a result of undo */
transactions = g_slist_append (transactions, package);
if (!inTransaction)
@@ -2013,7 +2009,6 @@
{
inTransaction = true;
bool cancel = (resolveProblems() == false);
-
// check if any package was modified from a restricted repo
if (!cancel && ypp->favoriteRepository()) {
const Repository *repo = ypp->favoriteRepository();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org