Author: rpmcruz
Date: Sun Feb 21 02:49:34 2010
New Revision: 60908
URL: http://svn.opensuse.org/viewcvs/yast?rev=60908&view=rev
Log:
* src/pkg/ygtkpkgdetailview.cc: added (void) before
system() call to quiet warning.
* src/CMakeLists.txt: added py2gtk dependency to test
target.
* src/pkg/CMakeLists.txt: added py2gtk dependency to
py2gtk_pkg target.
* src/pkg/ygtkpkgstatusbar.cc: small UI polish.
* src/pkg/pkg-selector-help.h: Atri Bhattacharya
spotted a couple of typos.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/CMakeLists.txt
trunk/gtk/src/pkg/CMakeLists.txt
trunk/gtk/src/pkg/YGPackageSelector.cc
trunk/gtk/src/pkg/pkg-selector-help.h
trunk/gtk/src/pkg/ygtkpkgdetailview.cc
trunk/gtk/src/pkg/ygtkpkgstatusbar.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=60908&r1=60907&r2=60908&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Feb 21 02:49:34 2010
@@ -1,3 +1,19 @@
+2010-02-21 Ricardo Cruz
+
+ * src/pkg/ygtkpkgdetailview.cc: added (void) before
+ system() call to quiet warning.
+
+ * src/CMakeLists.txt: added py2gtk dependency to test
+ target.
+
+ * src/pkg/CMakeLists.txt: added py2gtk dependency to
+ py2gtk_pkg target.
+
+ * src/pkg/ygtkpkgstatusbar.cc: small UI polish.
+
+ * src/pkg/pkg-selector-help.h: Atri Bhattacharya
+ spotted a couple of typos.
+
2010-02-20 Ricardo Cruz
* src/pkg/pkg-selector-help.h: updated help text.
Modified: trunk/gtk/src/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/CMakeLists.txt?rev=60908&r1=60907&r2=60908&view=diff
==============================================================================
--- trunk/gtk/src/CMakeLists.txt (original)
+++ trunk/gtk/src/CMakeLists.txt Sun Feb 21 02:49:34 2010
@@ -69,6 +69,7 @@
link_directories (${CMAKE_BINARY_DIR}/src)
add_executable (test test.cc)
+add_dependencies (test py2gtk)
target_link_libraries (test libpy2gtk.so)
target_link_libraries (test ${GTK2_LIBRARIES})
target_link_libraries (test ${LIBYUI_LIBRARY})
Modified: trunk/gtk/src/pkg/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/CMakeLists.txt?rev=60908&r1=60907&r2=60908&view=diff
==============================================================================
--- trunk/gtk/src/pkg/CMakeLists.txt (original)
+++ trunk/gtk/src/pkg/CMakeLists.txt Sun Feb 21 02:49:34 2010
@@ -34,10 +34,11 @@
## target:
add_library (py2gtk_pkg SHARED ${gtk_pkg_yast_plugin_SRCS})
+add_dependencies (py2gtk_pkg py2gtk)
## libraries:
-target_link_libraries (py2gtk_pkg libpy2gtk.so.2)
+target_link_libraries (py2gtk_pkg libpy2gtk.so)
target_link_libraries (py2gtk_pkg ${GTK2_LIBRARIES})
target_link_libraries (py2gtk_pkg ${LIBYUI_LIBRARY})
target_link_libraries (py2gtk_pkg ${ZYPP_LIBRARY})
Modified: trunk/gtk/src/pkg/YGPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/YGPackageSelector.cc?rev=60908&r1=60907&r2=60908&view=diff
==============================================================================
--- trunk/gtk/src/pkg/YGPackageSelector.cc (original)
+++ trunk/gtk/src/pkg/YGPackageSelector.cc Sun Feb 21 02:49:34 2010
@@ -488,7 +488,7 @@
virtual YGtkPkgQueryWidget *createQueryWidget (YGtkPkgQueryCombo *combo, int index)
{
Ypp::Busy busy (0);
- YGtkPkgFilterModel *model;
+ YGtkPkgFilterModel *model = 0;
if (YGPackageSelector::get()->onlineUpdateMode()) {
switch (index) {
case 0: model = new YGtkPkgPriorityModel(); break;
Modified: trunk/gtk/src/pkg/pkg-selector-help.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/pkg-selector-help.h?rev=60908&r1=60907&r2=60908&view=diff
==============================================================================
--- trunk/gtk/src/pkg/pkg-selector-help.h (original)
+++ trunk/gtk/src/pkg/pkg-selector-help.h Sun Feb 21 02:49:34 2010
@@ -11,16 +11,16 @@
"if needed. The user need not be concerned about such underlying <i>dependencies</i>. "
"Likewise, the plugins and other non-essential data of a given application may "
"be shipped in their own packages, so the user may install them only if needed.</p>"),
- _("<p>Common suffices for complementory packages:</p>"
+ _("<p>Common suffixes for complementory packages:</p>"
"<ul>"
"<li><b>-plugin-</b>: extends the application with extra functionality.</li>"
"<li><b>-devel</b>: headers for software development.</li>"
- "<li><b>-debuginfo</b>: debug symbols for for software testing.</li>"
+ "<li><b>-debuginfo</b>: debug symbols for software testing.</li>"
"<li><b>-fr</b>, <b>-pl</b> or other language siglas: translation files (your language "
"will be marked for installation automatically when needed).</li>"
"</ul>"),
_("<p>Both the packages that are installed on your system, and the packages "
- "that are available by the <i>repositories</i> you have configured will be listed "
+ "that are available from the <i>repositories</i> you have configured will be listed "
"together. <i>Status</i> filters are available in the right-bottom box.</p>"),
_("<blockquote>A repository is a packages media; it can either be local (such as the "
"installation CD), or a remote internet server. You can find an utility to setup "
Modified: trunk/gtk/src/pkg/ygtkpkgdetailview.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgdetailview.cc?rev=60908&r1=60907&r2=60908&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgdetailview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgdetailview.cc Sun Feb 21 02:49:34 2010
@@ -209,7 +209,7 @@
command += link;
}
command += " &";
- system (command.c_str());
+ (void) system (command.c_str());
}
static void copy_link_cb (GtkMenuItem *item, DetailDescription *pThis)
@@ -835,7 +835,7 @@
static void dirname_pressed_cb (GtkWidget *text, const gchar *link, FilelistExpander *pThis)
{
gchar *cmd = g_strdup_printf (GNOME_OPEN_BIN " %s &", link);
- system (cmd);
+ (void) system (cmd);
g_free (cmd);
}
Modified: trunk/gtk/src/pkg/ygtkpkgstatusbar.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgstatusbar.cc?rev=60908&r1=60907&r2=60908&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgstatusbar.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgstatusbar.cc Sun Feb 21 02:49:34 2010
@@ -16,15 +16,10 @@
#include "yzyppwrapper.h"
#include
-static void small_button_style_set_cb (GtkWidget *button, GtkStyle *prev_style)
-{ // based on gedit
- int width, height;
- gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (button),
- GTK_ICON_SIZE_MENU, &width, &height);
- gtk_widget_set_size_request (button, width+2, height+2);
-}
+static void small_size_request_cb (GtkWidget *widget, GtkRequisition *req)
+{ req->width += 4; }
-static void setup_small_widget_style()
+static void set_small_widget (GtkWidget *widget)
{
static bool first_time = true;
if (first_time) {
@@ -39,22 +34,10 @@
"}\n"
"widget \"*.small-widget\" style \"small-widget-style\"");
}
-}
-static GtkWidget *create_small_button (const char *stock_icon, const char *tooltip)
-{
- setup_small_widget_style();
-
- GtkWidget *button = gtk_button_new();
- gtk_widget_set_name (button, "small-widget");
- gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- gtk_widget_set_tooltip_text (button, tooltip);
- GtkWidget *image = gtk_image_new_from_stock (stock_icon, GTK_ICON_SIZE_MENU);
- gtk_button_set_image (GTK_BUTTON (button), image);
- g_signal_connect (G_OBJECT (button), "style-set",
- G_CALLBACK (small_button_style_set_cb), NULL);
- return button;
+ gtk_widget_set_name (widget, "small-widget");
+ g_signal_connect (G_OBJECT (widget), "size-request",
+ G_CALLBACK (small_size_request_cb), NULL);
}
struct LastChange {
@@ -64,16 +47,16 @@
LastChange()
{
-#if 0
icon = gtk_image_new();
gtk_widget_set_size_request (icon, 16, 16);
-#endif
+
text = gtk_label_new ("");
gtk_misc_set_alignment (GTK_MISC (text), 0, .5);
- undo_button = create_small_button (GTK_STOCK_UNDO, _("Undo"));
+ undo_button = gtk_button_new_from_stock (GTK_STOCK_UNDO);
+ set_small_widget (undo_button);
g_signal_connect (G_OBJECT (undo_button), "clicked",
G_CALLBACK (undo_clicked_cb), this);
- gchar *str = g_strdup_printf ("(%s</a>)", _("more"));
+ gchar *str = g_strdup_printf ("(%s</a>)", _("see all changes"));
GtkWidget *more = gtk_label_new (str);
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (more), TRUE);
@@ -82,9 +65,7 @@
G_CALLBACK (more_link_cb), this);
hbox = gtk_hbox_new (FALSE, 6);
-#if 0
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, TRUE, 0);
-#endif
gtk_box_pack_start (GTK_BOX (hbox), text, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), undo_button, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), more, FALSE, TRUE, 0);
@@ -95,15 +76,13 @@
int auto_count;
Ypp::Selectable *sel = list->front (&auto_count);
if (sel) {
-#if 0
const char *stock = getStatusStockIcon (*sel);
GdkPixbuf *pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default(),
stock, 16, GtkIconLookupFlags (0), NULL);
//GdkPixbuf *_pixbuf = YGUtils::setGray (pixbuf);
gtk_image_set_from_pixbuf (GTK_IMAGE (icon), pixbuf);
g_object_unref (G_OBJECT (pixbuf));
-#endif
-
+#if 1
const char *action;
if (sel->toInstall()) {
action = _("install");
@@ -132,14 +111,23 @@
else
format = "<b>%s</b> %s";
gchar *str = g_strdup_printf (format, action, sel->name().c_str(), auto_count);
+#else
+ const char *format;
+ if (auto_count > 1)
+ format = _("%s, plus %d dependencies");
+ else if (auto_count == 1)
+ format = _("%s, plus 1 dependency");
+ else
+ format = "%s";
+ gchar *str = g_strdup_printf (format, sel->name().c_str(), auto_count);
+#endif
+
gtk_label_set_markup (GTK_LABEL (text), str);
gtk_widget_set_sensitive (undo_button, TRUE);
g_free (str);
}
else {
-#if 0
gtk_image_clear (GTK_IMAGE (icon));
-#endif
gtk_label_set_markup (GTK_LABEL (text), _("<i>No changes to perform</i>"));
gtk_widget_set_sensitive (undo_button, FALSE);
}
@@ -238,7 +226,7 @@
combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
g_object_unref (G_OBJECT (store));
- setup_small_widget_style();
+ set_small_widget (combo);
gtk_widget_set_name (combo, "small-widget");
gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (combo), FALSE);
GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org