[yast-commit] r42519 - in /trunk/gtk/unstable/src: YGComboBox.cc YGPackageSelector.cc yzyppwrapper.cc
Author: rpmcruz
Date: Thu Nov 29 19:35:45 2007
New Revision: 42519
URL: http://svn.opensuse.org/viewcvs/yast?rev=42519&view=rev
Log:
Added busy cursor on transactions.
Don't show abandon changes on no-changes.
Modified:
trunk/gtk/unstable/src/YGComboBox.cc
trunk/gtk/unstable/src/YGPackageSelector.cc
trunk/gtk/unstable/src/yzyppwrapper.cc
Modified: trunk/gtk/unstable/src/YGComboBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/unstable/src/YGComboBox.cc?rev=42519&r1=42518&r2=42519&view=diff
==============================================================================
--- trunk/gtk/unstable/src/YGComboBox.cc (original)
+++ trunk/gtk/unstable/src/YGComboBox.cc Thu Nov 29 19:35:45 2007
@@ -26,8 +26,9 @@
gtk_combo_box_set_model (GTK_COMBO_BOX (getWidget()), GTK_TREE_MODEL (store));
g_object_unref (store);
- if(opt.isEditable.value())
+ if(opt.isEditable.value()) {
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (getWidget()), 0);
+ }
else {
GtkCellRenderer* cell = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (getWidget()), cell, TRUE);
Modified: trunk/gtk/unstable/src/YGPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/unstable/src/YGPackageSelector.cc?rev=42519&r1=42518&r2=42519&view=diff
==============================================================================
--- trunk/gtk/unstable/src/YGPackageSelector.cc (original)
+++ trunk/gtk/unstable/src/YGPackageSelector.cc Thu Nov 29 19:35:45 2007
@@ -29,6 +29,15 @@
inline void FILEMANAGER_LAUNCH (const char *path)
{ system ((std::string (FILEMANAGER_EXEC) + " -n --no-desktop " + path + " &").c_str()); }
+static void busyCursor()
+{
+ YGUI::ui()->busyCursor();
+ // so that the cursor is actually set...
+ while (g_main_context_iteration (NULL, FALSE)) ;
+}
+static void normalCursor()
+{ YGUI::ui()->normalCursor(); }
+
#include "icons/pkg-list-mode.xpm"
#include "icons/pkg-tiles-mode.xpm"
@@ -206,7 +215,8 @@
};
void setMode (ViewMode mode)
{
- busyCursor();
+ if (GTK_WIDGET_REALIZED (m_bin))
+ busyCursor();
g_signal_handlers_block_by_func (m_list_button, (gpointer) mode_toggled_cb, this);
g_signal_handlers_block_by_func (m_icon_button, (gpointer) mode_toggled_cb, this);
@@ -233,7 +243,8 @@
void query (Ypp::Query *query)
{
- busyCursor();
+ if (GTK_WIDGET_REALIZED (m_bin))
+ busyCursor();
if (m_model)
g_object_unref (G_OBJECT (m_model));
@@ -261,20 +272,6 @@
ViewMode mode = GTK_WIDGET (toggle) == pThis->m_list_button ? LIST_MODE : ICON_MODE;
pThis->setMode (mode);
}
-
- void busyCursor()
- {
- if (GTK_WIDGET_REALIZED (m_bin)) {
- YGUI::ui()->busyCursor();
- // so that the cursor is actually set...
- while (g_main_context_iteration (NULL, FALSE)) ;
- }
- }
- void normalCursor()
- {
- if (GTK_WIDGET_REALIZED (m_bin))
- YGUI::ui()->normalCursor();
- }
};
// TEMP: a window of modified packages
@@ -1009,6 +1006,7 @@
private:
static void install_clicked_cb (GtkButton *button, PackageControl *pThis)
{
+ busyCursor();
Ypp::get()->startTransactions();
for (std::list
participants (1)
-
rpmcruz@svn.opensuse.org