Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] r58554 - in /trunk/gtk: ChangeLog src/YGUtils.cc src/ygtkfindentry.c src/ygtknotebook.c src/ygtkzyppview.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Sun, 06 Sep 2009 19:22:07 -0000
  • Message-id: <E1MkNJP-0007vN-Qq@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Sun Sep 6 21:22:07 2009
New Revision: 58554

URL: http://svn.opensuse.org/viewcvs/yast?rev=58554&view=rev
Log:
* src/YGUtils.cc: map stock icons for enable/disable.

* src/ygtkfindentry.c: look: center-align menu arrow.

* src/ygtkzyppview.cc: bug fix: "upgrade all" was alternating
the check boxes instead of simply setting all true.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGUtils.cc
trunk/gtk/src/ygtkfindentry.c
trunk/gtk/src/ygtknotebook.c
trunk/gtk/src/ygtkzyppview.cc

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=58554&r1=58553&r2=58554&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Sep 6 21:22:07 2009
@@ -1,5 +1,14 @@
2009-09-06 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

+ * src/YGUtils.cc: map stock icons for enable/disable.
+
+ * src/ygtkfindentry.c: look: center-align menu arrow.
+
+ * src/ygtkzyppview.cc: bug fix: "upgrade all" was alternating
+ the check boxes instead of simply setting all true.
+
+2009-09-06 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
* src/ygtktooltip.h/c: re-added tooltip window.

* src/ygtknotebook.h/c: sub-notebook that allows a widget to be

Modified: trunk/gtk/src/YGUtils.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUtils.cc?rev=58554&r1=58553&r2=58554&view=diff
==============================================================================
--- trunk/gtk/src/YGUtils.cc (original)
+++ trunk/gtk/src/YGUtils.cc Sun Sep 6 21:22:07 2009
@@ -602,6 +602,8 @@
stockMap [_("Delete")] = GTK_STOCK_DELETE;
stockMap [_("Up")] = GTK_STOCK_GO_UP;
stockMap [_("Down")] = GTK_STOCK_GO_DOWN;
+ stockMap [_("Enable")] = GTK_STOCK_YES;
+ stockMap [_("Disable")] = GTK_STOCK_NO;
}

std::string id = cutUnderline (label);

Modified: trunk/gtk/src/ygtkfindentry.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkfindentry.c?rev=58554&r1=58553&r2=58554&view=diff
==============================================================================
--- trunk/gtk/src/ygtkfindentry.c (original)
+++ trunk/gtk/src/ygtkfindentry.c Sun Sep 6 21:22:07 2009
@@ -389,7 +389,7 @@
if (fentry->context_menu && event->window ==
eentry->left_window)
gtk_paint_arrow (widget->style, event->window,
GTK_STATE_NORMAL,
GTK_SHADOW_NONE, &event->area, widget, NULL,
GTK_ARROW_DOWN, FALSE,
- win_width - ARROW_SIZE-1, win_height -
ARROW_SIZE, ARROW_SIZE, ARROW_SIZE);
+ win_width - ARROW_SIZE-1, (win_height -
ARROW_SIZE)/2, ARROW_SIZE, ARROW_SIZE);
}
else
GTK_WIDGET_CLASS (ygtk_find_entry_parent_class)->expose_event
(widget, event);

Modified: trunk/gtk/src/ygtknotebook.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtknotebook.c?rev=58554&r1=58553&r2=58554&view=diff
==============================================================================
--- trunk/gtk/src/ygtknotebook.c (original)
+++ trunk/gtk/src/ygtknotebook.c Sun Sep 6 21:22:07 2009
@@ -49,7 +49,7 @@
child_alloc.width = MIN (allocation->width - tabs_width,
child_req.width);
child_alloc.height = child_req.height;
child_alloc.x = allocation->x + (allocation->width -
child_alloc.width);
- child_alloc.y = allocation->y + 3;
+ child_alloc.y = allocation->y + 2;

gtk_widget_size_allocate (ynotebook->corner_widget,
&child_alloc);
}

Modified: trunk/gtk/src/ygtkzyppview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkzyppview.cc?rev=58554&r1=58553&r2=58554&view=diff
==============================================================================
--- trunk/gtk/src/ygtkzyppview.cc (original)
+++ trunk/gtk/src/ygtkzyppview.cc Sun Sep 6 21:22:07 2009
@@ -875,29 +875,32 @@
return package != NULL;
}

- static void apply (Ypp::Package *package, int col)
+ static void apply (Ypp::Package *package, int col, bool enable)
{
- if (package->toModify())
+ if (enable)
+ switch (col) {
+ case ZyppModel::TO_INSTALL_COLUMN:
+ case ZyppModel::TO_UPGRADE_COLUMN:
+ package->install (0);
+ break;
+ case ZyppModel::TO_REMOVE_COLUMN:
+ package->remove();
+ break;
+ default: break;
+ }
+ else
package->undo();
- else switch (col) {
- case ZyppModel::TO_INSTALL_COLUMN:
- case ZyppModel::TO_UPGRADE_COLUMN:
- package->install (0);
- break;
- case ZyppModel::TO_REMOVE_COLUMN:
- package->remove();
- break;
- default: break;
- }
}

static gboolean apply_iter_cb (GtkTreeModel *model,
GtkTreePath *path, GtkTreeIter *iter, gpointer col)
{
Ypp::Package *package;
+ gboolean enable;
+ enable = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (model),
"enable"));
gtk_tree_model_get (model, iter, ZyppModel::PTR_COLUMN,
&package, -1);
if (package)
- apply (package, GPOINTER_TO_INT (col));
+ apply (package, GPOINTER_TO_INT (col), enable);
return FALSE;
}

@@ -911,12 +914,13 @@
gtk_tree_model_get_iter_from_string (model, &iter, path_str);
gtk_tree_model_get (model, &iter, ZyppModel::PTR_COLUMN,
&package, -1);

- //gboolean active = gtk_cell_renderer_toggle_get_active
(renderer);
+ gboolean active = gtk_cell_renderer_toggle_get_active
(renderer);
int col = GPOINTER_TO_INT (g_object_get_data (G_OBJECT
(renderer), "col"));
if (package)
- apply (package, col);
+ apply (package, col, !active);
else {
if (!gtk_tree_model_iter_next (model, &iter)) { // on
apply-all
+ g_object_set_data (G_OBJECT (model), "enable",
GINT_TO_POINTER (!active));
Ypp::get()->startTransactions();
gtk_tree_model_foreach (model, apply_iter_cb,
GINT_TO_POINTER (col));
Ypp::get()->finishTransactions();

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

< Previous Next >
This Thread
  • No further messages