Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] r58555 - in /trunk/gtk: ChangeLog src/YGPackageSelector.cc src/ygtkzyppview.cc src/ygtkzyppview.h
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Sun, 06 Sep 2009 21:33:38 -0000
  • Message-id: <E1MkPMg-0001Hq-9r@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Sun Sep 6 23:33:37 2009
New Revision: 58555

URL: http://svn.opensuse.org/viewcvs/yast?rev=58555&view=rev
Log:
* src/ygtkzyppview.h/cc & src/YGPackageSelector.cc: use
"xpad" instead of italic fonts for 'auto' packages.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGPackageSelector.cc
trunk/gtk/src/ygtkzyppview.cc
trunk/gtk/src/ygtkzyppview.h

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

+ * src/ygtkzyppview.h/cc & src/YGPackageSelector.cc: use
+ "xpad" instead of italic fonts for 'auto' packages.
+
+2009-09-06 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
* src/YGUtils.cc: map stock icons for enable/disable.

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

Modified: trunk/gtk/src/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev=58555&r1=58554&r2=58555&view=diff
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Sun Sep 6 23:33:37 2009
@@ -180,7 +180,7 @@
gtk_box_pack_start (GTK_BOX (label_box), label, TRUE,
TRUE, 0);
YGtkPackageView *view = ygtk_package_view_new (FALSE);
view->appendCheckColumn (checkCol);
- view->appendTextColumn (NULL, ZyppModel::NAME_COLUMN);
+ view->appendTextColumn (NULL, ZyppModel::NAME_COLUMN,
-1, true);
view->setList (list, NULL);
view->setListener (listener);
gtk_scrolled_window_set_shadow_type (

Modified: trunk/gtk/src/ygtkzyppview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkzyppview.cc?rev=58555&r1=58554&r2=58555&view=diff
==============================================================================
--- trunk/gtk/src/ygtkzyppview.cc (original)
+++ trunk/gtk/src/ygtkzyppview.cc Sun Sep 6 23:33:37 2009
@@ -101,6 +101,7 @@
return G_TYPE_BOOLEAN;
case ZyppModel::STYLE_COLUMN:
case ZyppModel::WEIGHT_COLUMN:
+ case ZyppModel::XPAD_COLUMN:
return G_TYPE_INT;
case ZyppModel::PTR_COLUMN:
return G_TYPE_POINTER;
@@ -139,6 +140,9 @@
case ZyppModel::WEIGHT_COLUMN:
g_value_set_int (value, PANGO_WEIGHT_NORMAL);
break;
+ case ZyppModel::XPAD_COLUMN:
+ g_value_set_int (value, 0);
+ break;
case ZyppModel::SENSITIVE_COLUMN:
g_value_set_boolean (value, TRUE);
break;
@@ -490,6 +494,7 @@
case ZyppModel::SENSITIVE_COLUMN:
g_value_set_boolean (value,
!package->isLocked());
break;
+/*
case ZyppModel::STYLE_COLUMN: {
PangoStyle style = PANGO_STYLE_NORMAL;
if (package->isAuto())
@@ -497,12 +502,18 @@
g_value_set_int (value, style);
break;
}
+*/
case ZyppModel::WEIGHT_COLUMN: {
bool highlight = segment->list.highlight
(package);
int weight = highlight ? PANGO_WEIGHT_BOLD :
PANGO_WEIGHT_NORMAL;
g_value_set_int (value, weight);
break;
}
+ case ZyppModel::XPAD_COLUMN: {
+ int xpad = package->isAuto() ? 10 : 0;
+ g_value_set_int (value, xpad);
+ break;
+ }
case ZyppModel::PTR_COLUMN:
g_value_set_pointer (value, (void *) package);
break;
@@ -722,7 +733,7 @@
gtk_tree_view_append_column (view, column);
}

- void appendTextColumn (const char *header, int col, int size)
+ void appendTextColumn (const char *header, int col, int size, bool
identAuto)
{
GtkTreeView *view = GTK_TREE_VIEW (m_view);
if (header)
@@ -744,6 +755,8 @@
"foreground", ZyppModel::FOREGROUND_COLUMN,
"cell-background", ZyppModel::BACKGROUND_COLUMN,
NULL);
+ if (identAuto)
+ gtk_tree_view_column_add_attribute (column, renderer,
"xpad", ZyppModel::XPAD_COLUMN);
gtk_tree_view_column_set_sizing (column,
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_resizable (column, TRUE);
if (size >= 0)
@@ -1055,8 +1068,8 @@
void YGtkPackageView::appendCheckColumn (int col)
{ impl->appendCheckColumn (col); }

-void YGtkPackageView::appendTextColumn (const char *header, int col, int size)
-{ impl->appendTextColumn (header, col, size); }
+void YGtkPackageView::appendTextColumn (const char *header, int col, int size,
bool identAuto)
+{ impl->appendTextColumn (header, col, size, identAuto); }

void YGtkPackageView::setListener (Listener *listener)
{ impl->m_listener = listener; }

Modified: trunk/gtk/src/ygtkzyppview.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkzyppview.h?rev=58555&r1=58554&r2=58555&view=diff
==============================================================================
--- trunk/gtk/src/ygtkzyppview.h (original)
+++ trunk/gtk/src/ygtkzyppview.h Sun Sep 6 23:33:37 2009
@@ -22,7 +22,7 @@
TO_INSTALL_COLUMN, TO_UPGRADE_COLUMN, TO_REMOVE_COLUMN,
TO_MODIFY_COLUMN,
// internal
STYLE_COLUMN, WEIGHT_COLUMN, SENSITIVE_COLUMN,
CHECK_VISIBLE_COLUMN,
- FOREGROUND_COLUMN, BACKGROUND_COLUMN,
+ FOREGROUND_COLUMN, BACKGROUND_COLUMN, XPAD_COLUMN,
// misc
PTR_COLUMN, TOTAL_COLUMNS
};
@@ -58,7 +58,7 @@

void appendCheckColumn (int col);
void appendIconColumn (const char *header, int col);
- void appendTextColumn (const char *header, int col, int size = -1);
+ void appendTextColumn (const char *header, int col, int size = -1, bool
identAuto = false);
// (set all column headers to NULL in order to hide them.)

struct Listener {

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

< Previous Next >
This Thread
  • No further messages