Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47299 - in /trunk/gtk: ChangeLog src/YGPackageSelector.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Mon, 05 May 2008 18:34:16 -0000
  • Message-id: <20080505183417.358DB2952D@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Mon May 5 20:34:15 2008
New Revision: 47299

URL: http://svn.opensuse.org/viewcvs/yast?rev=47299&view=rev
Log:
* src/YGPackageSelector.cc: feature request 381956: supported
repoMgrEnabled() flag, to avoid having the "add/remove" entry
on install.

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

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=47299&r1=47298&r2=47299&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Mon May 5 20:34:15 2008
@@ -36,6 +36,10 @@
* src/YGPackageSelector.cc: some massage for bug 381689: reduced
default size, changed installed version layout button a bit.

+ * src/YGPackageSelector.cc: feature request 381956: supported
+ repoMgrEnabled() flag, to avoid having the "add/remove" entry
+ on install.
+
2008-04-21 Michael Meeks <michael.meeks@xxxxxxxxxx>

* src/YGSelectionModel.cc (findByText): implemented.

Modified: trunk/gtk/src/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev=47299&r1=47298&r2=47299&view=diff
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Mon May 5 20:34:15 2008
@@ -1272,7 +1272,7 @@
Listener *m_listener;
guint timeout_id;
int m_selectedType;
- bool m_updateMode;
+ bool m_updateMode, m_enableRepoMgr;

public:
GtkWidget *getCollectionWidget() { return m_collection->getWidget(); }
@@ -1281,11 +1281,12 @@
GtkWidget *getReposWidget() { return m_repos; }
GtkWidget *getTypeWidget() { return m_type; }

- Filters (bool update_mode)
- : m_listener (NULL), timeout_id (0), m_selectedType (-1), m_updateMode
(update_mode)
+ Filters (bool updateMode, bool enableRepoMgr)
+ : m_listener (NULL), timeout_id (0), m_selectedType (-1),
+ m_updateMode (updateMode), m_enableRepoMgr (enableRepoMgr)
{
m_collection = new Collections (this);
- m_statuses = new StatusButtons (this, update_mode);
+ m_statuses = new StatusButtons (this, updateMode);

m_name = ygtk_find_entry_new();
gtk_widget_set_tooltip_markup (m_name,
@@ -1316,12 +1317,15 @@
for (int i = 0; Ypp::get()->getRepository (i); i++) {
const Ypp::Repository *repo = Ypp::get()->getRepository
(i);
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter, 0,
repo->name.c_str(), 1, FALSE, -1);
+ std::string str = " " + repo->name;
+ gtk_list_store_set (store, &iter, 0, str.c_str(), 1,
FALSE, -1);
+ }
+ if (enableRepoMgr) {
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter, 0, "-", 1, TRUE, -1);
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter, 0, _("Add or
Remove..."), 1, FALSE, -1);
}
- gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter, 0, "-", 1, TRUE, -1);
- gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter, 0, _("Add or Remove..."), 1,
FALSE, -1);
gtk_combo_box_set_active (GTK_COMBO_BOX (m_repos), 0);
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (m_repos),
is_combo_entry_separator_cb, this, NULL);
@@ -1329,7 +1333,7 @@
G_CALLBACK (combo_changed_cb), this);

m_type = gtk_combo_box_new_text();
- if (update_mode)
+ if (updateMode)
gtk_combo_box_append_text (GTK_COMBO_BOX (m_type),
_("Patches"));
else {
gtk_combo_box_append_text (GTK_COMBO_BOX (m_type),
_("Categories"));
@@ -1355,11 +1359,13 @@
GtkComboBox *combo = GTK_COMBO_BOX (m_repos);
int repo = gtk_combo_box_get_active (combo);

- GtkTreeModel *model = gtk_combo_box_get_model (combo);
- int setup_id = gtk_tree_model_iter_n_children (model, NULL);
- if (repo == setup_id-1) {
- YGUI::ui()->sendEvent (new YMenuEvent ("repo_mgr"));
- repo = 0;
+ if (m_enableRepoMgr) {
+ GtkTreeModel *model = gtk_combo_box_get_model (combo);
+ int setup_id = gtk_tree_model_iter_n_children (model,
NULL);
+ if (repo == setup_id-1) {
+ YGUI::ui()->sendEvent (new YMenuEvent
("repo_mgr"));
+ repo = 0;
+ }
}

return repo-1;
@@ -2156,14 +2162,14 @@
GtkWidget *getWidget()
{ return m_box; }

- PackageSelector (bool update_mode)
+ PackageSelector (bool updateMode, bool enableRepoMgr)
{
m_packages = new PackagesView (false);
- m_filters = new Filters (update_mode);
+ m_filters = new Filters (updateMode, enableRepoMgr);
m_control = new PackageControl (m_filters);
- m_details = new PackageDetails (update_mode);
+ m_details = new PackageDetails (updateMode);
m_disk = new DiskView();
- m_changes = new ChangesPane (update_mode);
+ m_changes = new ChangesPane (updateMode);
m_packages->setListener (this);
m_filters->setListener (this);

@@ -2282,7 +2288,7 @@
YGDialog *dialog = YGDialog::currentDialog();
dialog->setCloseCallback (confirm_cb, this);

- m_package_selector = new PackageSelector (onlineUpdateMode());
+ m_package_selector = new PackageSelector (onlineUpdateMode(),
repoMgrEnabled());
gtk_container_add (GTK_CONTAINER (wizard),
m_package_selector->getWidget());

Ypp::get()->setInterface (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