Author: rpmcruz
Date: Thu Apr 1 18:23:22 2010
New Revision: 61576
URL: http://svn.opensuse.org/viewcvs/yast?rev=61576&view=rev
Log:
* src/pkg/ygtkpkgsearchentry.cc: bug fix: update
entry status on automatic changes.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/pkg/ygtkpkgsearchentry.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=61576&r1=61575&r2=61576&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Thu Apr 1 18:23:22 2010
@@ -1,5 +1,10 @@
2010-04-01 Ricardo Cruz
+ * src/pkg/ygtkpkgsearchentry.cc: bug fix: update
+ entry status on automatic changes.
+
+2010-04-01 Ricardo Cruz
+
* src/pkg/ygtkpkghistorydialog.cc: added some markup
to the text as requested by Atri.
Modified: trunk/gtk/src/pkg/ygtkpkgsearchentry.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgsearchentry.cc?rev=61576&r1=61575&r2=61576&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgsearchentry.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgsearchentry.cc Thu Apr 1 18:23:22 2010
@@ -16,16 +16,12 @@
GtkWidget *box, *entry, *combo;
};
-static void entry_changed_cb (GtkEditable *editable, YGtkPkgSearchEntry *pThis)
+static void entry_icons_sync (GtkWidget *widget)
{
- int item = gtk_combo_box_get_active (GTK_COMBO_BOX (pThis->impl->combo));
- pThis->notifyDelay (item == 0 ? 150 : 500);
-
static GdkColor yellow = { 0, 0xf7f7, 0xf7f7, 0xbdbd };
static GdkColor black = { 0, 0, 0, 0 };
- GtkWidget *widget = GTK_WIDGET (editable);
- GtkEntry *entry = GTK_ENTRY (editable); // show clear icon if text
+ GtkEntry *entry = GTK_ENTRY (widget); // show clear icon if text
const gchar *name = gtk_entry_get_text (entry);
bool showIcon = *name;
if (showIcon != gtk_entry_get_icon_activatable (entry, GTK_ENTRY_ICON_SECONDARY)) {
@@ -47,6 +43,13 @@
}
}
+static void entry_changed_cb (GtkEditable *editable, YGtkPkgSearchEntry *pThis)
+{
+ int item = gtk_combo_box_get_active (GTK_COMBO_BOX (pThis->impl->combo));
+ pThis->notifyDelay (item == 0 ? 150 : 500);
+ entry_icons_sync (GTK_WIDGET (editable));
+}
+
static void combo_changed_cb (GtkComboBox *combo, YGtkPkgSearchEntry *pThis)
{
const gchar *name = gtk_entry_get_text (GTK_ENTRY (pThis->impl->entry));
@@ -260,6 +263,7 @@
g_signal_handlers_block_by_func (impl->combo, (gpointer) combo_changed_cb, this);
gtk_combo_box_set_active (GTK_COMBO_BOX (impl->combo), index);
gtk_entry_set_text (GTK_ENTRY (impl->entry), text.c_str());
+ entry_icons_sync (impl->entry);
g_signal_handlers_unblock_by_func (impl->entry, (gpointer) entry_changed_cb, this);
g_signal_handlers_unblock_by_func (impl->combo, (gpointer) combo_changed_cb, this);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org