Mailinglist Archive: yast-commit (2080 mails)

< Previous Next >
[yast-commit] r58626 - in /trunk/gtk: ChangeLog src/YGPackageSelector.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Sun, 13 Sep 2009 15:25:09 -0000
  • Message-id: <E1Mmqwv-0002WC-Nd@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Sun Sep 13 17:25:09 2009
New Revision: 58626

URL: http://svn.opensuse.org/viewcvs/yast?rev=58626&view=rev
Log:
* src/YGPackageSelector.cc: removed "filter by novelty" from
search (pass --novelty-filter to enable it) and moved it as
the Groups item "Fresh".

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

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=58626&r1=58625&r2=58626&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Sep 13 17:25:09 2009
@@ -1,3 +1,9 @@
+2009-09-13 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
+ * src/YGPackageSelector.cc: removed "filter by novelty" from
+ search (pass --novelty-filter to enable it) and moved it as
+ the Groups item "Fresh".
+
2009-09-10 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* src/ygtkfindentry.c: bug fix: on resize find and erase

Modified: trunk/gtk/src/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev=58626&r1=58625&r2=58626&view=diff
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Sun Sep 13 17:25:09 2009
@@ -23,13 +23,15 @@
#include "ygtktooltip.h"

// experiments:
-static bool show_find_pane = false, use_buttons = false;
+static bool show_find_pane = false, use_buttons = false, show_novelty_filter =
false;
bool YGUI::pkgSelectorParse (const char *arg)
{
if (!strcmp (arg, "find-pane"))
show_find_pane = true;
else if (!strcmp (arg, "buttons"))
use_buttons = true;
+ else if (!strcmp (arg, "novelty-filter"))
+ show_novelty_filter = true;
else return false;
return true;
}
@@ -258,7 +260,7 @@
{
protected:
GtkWidget *m_view, *m_scroll, *m_box;
- enum Column { TEXT_COL, ICON_COL, ENABLED_COL, PTR_COL, TOTAL_COLS };
+ enum Column { TEXT_COL, ICON_COL, ENABLED_COL, PTR_COL, TOOLTIP_COL,
TOTAL_COLS };

virtual void doBuild (GtkTreeStore *store) = 0;
virtual void writeQuery (Ypp::PkgQuery::Query *query,
@@ -316,6 +318,7 @@
if (do_tooltip)
gtk_tree_view_set_tooltip_column (view, TEXT_COL);
gtk_tree_view_set_show_expanders (view, tree_mode);
+ gtk_tree_view_set_tooltip_column (view, TOOLTIP_COL);

GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
@@ -332,7 +335,7 @@
gtk_tree_view_append_column (view, column);

GtkTreeStore *store = gtk_tree_store_new (TOTAL_COLS,
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN,
G_TYPE_POINTER);
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN,
G_TYPE_POINTER, G_TYPE_STRING);
GtkTreeModel *model = GTK_TREE_MODEL (store);
gtk_tree_view_set_model (view, model);
g_object_unref (G_OBJECT (model));
@@ -347,7 +350,8 @@
block();
GtkTreeIter iter;
gtk_tree_store_append (store, &iter, NULL);
- gtk_tree_store_set (store, &iter, TEXT_COL, _("All"),
ENABLED_COL, TRUE, -1);
+ gtk_tree_store_set (store, &iter, TEXT_COL, _("All"),
ENABLED_COL, TRUE,
+ TOOLTIP_COL, _("No filter"), -1);
doBuild (store);

selectFirstItem();
@@ -461,11 +465,15 @@
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter, TEXT_COL,
_("Recommended"),
ICON_COL, GTK_STOCK_ABOUT, PTR_COL,
GINT_TO_POINTER (1),
- ENABLED_COL, TRUE, -1);
+ ENABLED_COL, TRUE, TOOLTIP_COL, _("Recommended
by an installed package"), -1);
gtk_tree_store_append (store, &iter, NULL);
gtk_tree_store_set (store, &iter, TEXT_COL,
_("Suggested"),
ICON_COL, GTK_STOCK_ABOUT, PTR_COL,
GINT_TO_POINTER (2),
- ENABLED_COL, TRUE, -1);
+ ENABLED_COL, TRUE, TOOLTIP_COL, _("Suggested by
an installed package"), -1);
+ gtk_tree_store_append (store, &iter, NULL);
+ gtk_tree_store_set (store, &iter, TEXT_COL, _("Fresh"),
+ ICON_COL, GTK_STOCK_NEW, PTR_COL,
GINT_TO_POINTER (3),
+ ENABLED_COL, TRUE, TOOLTIP_COL, _("Uploaded in
the last week"), -1);
}
}

@@ -477,6 +485,8 @@
query->setIsRecommended (true);
else if (nptr == 2)
query->setIsSuggested (true);
+ else if (nptr == 3)
+ query->setBuildAge (7);
else if (ptr) {
Ypp::Node *node = (Ypp::Node *) ptr;
if (m_rpmGroups || m_onlineUpdate)
@@ -698,6 +708,7 @@
gtk_box_pack_start (GTK_BOX (name_box), m_name, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (name_box), button, FALSE, TRUE, 0);

+ for (int i = 0; i < 5; i++) m_radio[i] = 0;
GtkWidget *radio_box = gtk_vbox_new (FALSE, 0);
m_radio[0] = gtk_radio_button_new_with_label_from_widget (NULL,
_("Name & summary"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (m_radio[0]),
TRUE);
@@ -707,9 +718,11 @@
m_radio[2] =
gtk_radio_button_new_with_label_from_widget (radiob, _("File name"));
gtk_widget_set_tooltip_text (m_radio[2],
find_entry_file_tooltip);
m_radio[3] =
gtk_radio_button_new_with_label_from_widget (radiob, _("Author"));
- m_radio[4] =
gtk_radio_button_new_with_label_from_widget (radiob, _("Novelty (in days)"));
- g_signal_connect (G_OBJECT (m_radio[4]), "toggled",
G_CALLBACK (novelty_toggled_cb), this);
- gtk_widget_set_tooltip_markup (m_radio[4],
find_entry_novelty_tooltip);
+ if (show_novelty_filter) {
+ m_radio[4] =
gtk_radio_button_new_with_label_from_widget (radiob, _("Novelty (in days)"));
+ g_signal_connect (G_OBJECT (m_radio[4]),
"toggled", G_CALLBACK (novelty_toggled_cb), this);
+ gtk_widget_set_tooltip_markup (m_radio[4],
find_entry_novelty_tooltip);
+ }
}
for (int i = 0; i < 5; i++)
if (m_radio [i])
@@ -875,8 +888,9 @@
_("Filter by file"), GTK_STOCK_OPEN,
find_entry_file_tooltip);
ygtk_find_entry_insert_item (YGTK_FIND_ENTRY (m_name),
_("Filter by author"), GTK_STOCK_ABOUT, NULL);
- ygtk_find_entry_insert_item (YGTK_FIND_ENTRY (m_name),
_("Filter by novelty (in days)"),
- GTK_STOCK_NEW, find_entry_novelty_tooltip);
+ if (show_novelty_filter)
+ ygtk_find_entry_insert_item (YGTK_FIND_ENTRY
(m_name),
+ _("Filter by novelty (in days)"),
GTK_STOCK_NEW, find_entry_novelty_tooltip);
}
g_signal_connect (G_OBJECT (m_name), "changed",
G_CALLBACK (name_changed_cb), this);

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

< Previous Next >
This Thread
  • No further messages