diff --git a/ChangeLog b/ChangeLog index 968fcb35..0d9df6e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Feb 19 20:58:13 CET 2014 - anaselli@linux.it + +- Added seconds to YTimeField as for Qt +- Fixed BusyCursor +- Fixed YTree item selection during items population, + old implementation ignored selected items. +- Aligned dialog title behavior to QT +- 2.44.1 + ------------------------------------------------------------------- Thu Dec 5 16:36:33 UTC 2013 - mvidner@suse.com diff --git a/VERSION.cmake b/VERSION.cmake index cf9ef7e3..72749759 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,6 +1,6 @@ SET( VERSION_MAJOR "2" ) SET( VERSION_MINOR "44" ) -SET( VERSION_PATCH "0" ) +SET( VERSION_PATCH "1" ) SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SHA1}" ) ##### This is need for the libyui core, ONLY. diff --git a/src/YGDialog.cc b/src/YGDialog.cc index 74af6115..ba718dfb 100644 --- a/src/YGDialog.cc +++ b/src/YGDialog.cc @@ -81,10 +81,17 @@ class YGWindow parent = GTK_WINDOW (yglast->m_window->getWidget()); } GtkWindow *window = GTK_WINDOW (m_widget); + // to be back compatible + std::string dialogTitle = "YaSt"; +#ifdef LIBYUI_VERSION_NUM + #if LIBYUI_VERSION_AT_LEAST(2,42,3) + dialogTitle = YUI::app()->applicationTitle(); + #endif +#endif if (parent) { // if there is a parent, this would be a dialog - gtk_window_set_title (window, ""); + gtk_window_set_title (window, dialogTitle.c_str()); gtk_window_set_modal (window, TRUE); gtk_window_set_transient_for (window, parent); gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DIALOG); @@ -93,21 +100,15 @@ class YGWindow atk_object_set_role (peer, ATK_ROLE_DIALOG); } else { + gtk_window_set_title (window, dialogTitle.c_str()); #ifdef LIBYUI_VERSION_NUM #if LIBYUI_VERSION_AT_LEAST(2,42,3) - gtk_window_set_title (window, YUI::app()->applicationTitle().c_str()); GdkPixbuf *pixbuf = YGUtils::loadPixbuf (YUI::app()->applicationIcon()); if (pixbuf) { // default window icon gtk_window_set_default_icon (pixbuf); g_object_unref (G_OBJECT (pixbuf)); } - #else - // to be back compatible - gtk_window_set_title (window, "YaST"); #endif -#else - // to be back compatible - gtk_window_set_title (window, "YaST"); #endif if (YGUI::ui()->unsetBorder()) gtk_window_set_decorated (window, FALSE); @@ -181,8 +182,11 @@ class YGWindow m_busyCursor = gdk_cursor_new_for_display (display, GDK_WATCH); g_object_ref (G_OBJECT (m_busyCursor)); } - if (!m_isBusy) - gdk_window_set_cursor (gtk_widget_get_window(m_widget), m_busyCursor); + if (!m_isBusy) { + GdkDisplay *display = gtk_widget_get_display (m_widget); + gdk_window_set_cursor (gtk_widget_get_window(m_widget), m_busyCursor); + gdk_display_sync(display); + } m_isBusy = true; } diff --git a/src/YGInputField.cc b/src/YGInputField.cc index e92759a2..e60ae819 100644 --- a/src/YGInputField.cc +++ b/src/YGInputField.cc @@ -98,8 +98,10 @@ class YGTimeField : public YTimeField, public YGLabeledWidget YGtkFieldEntry *field = YGTK_FIELD_ENTRY (getWidget()); ygtk_field_entry_add_field (field, ':'); ygtk_field_entry_add_field (field, ':'); + ygtk_field_entry_add_field (field, ':'); ygtk_field_entry_setup_field (field, 0, 2, "0123456789"); ygtk_field_entry_setup_field (field, 1, 2, "0123456789"); + ygtk_field_entry_setup_field (field, 2, 2, "0123456789"); connect (getWidget(), "field-entry-changed", G_CALLBACK (value_changed_cb), this); } @@ -109,22 +111,24 @@ class YGTimeField : public YTimeField, public YGLabeledWidget { BlockEvents block (this); if (time.empty()) return; - char hours[3], mins[3]; - sscanf (time.c_str(), "%2s:%2s", hours, mins); + char hours[3], mins[3], secs[3]; + sscanf (time.c_str(), "%2s:%2s:%2s", hours, mins, secs); YGtkFieldEntry *entry = YGTK_FIELD_ENTRY (getWidget()); ygtk_field_entry_set_field_text (entry, 0, hours); ygtk_field_entry_set_field_text (entry, 1, mins); + ygtk_field_entry_set_field_text (entry, 2, secs); } virtual std::string value() { - const gchar *hours, *mins; + const gchar *hours, *mins, *secs; YGtkFieldEntry *entry = YGTK_FIELD_ENTRY (getWidget()); hours = ygtk_field_entry_get_field_text (entry, 0); mins = ygtk_field_entry_get_field_text (entry, 1); + secs = ygtk_field_entry_get_field_text (entry, 2); - gchar *time = g_strdup_printf ("%02d:%02d:00", atoi (hours), atoi (mins)); + gchar *time = g_strdup_printf ("%02d:%02d:%02d", atoi (hours), atoi (mins), atoi (secs)); std::string str (time); g_free (time); return str; diff --git a/src/YGTreeView.cc b/src/YGTreeView.cc index 2145b80f..bb62a533 100644 --- a/src/YGTreeView.cc +++ b/src/YGTreeView.cc @@ -695,7 +695,6 @@ class YGTree : public YTree, public YGTreeView GtkTreeIter iter; addRow (item, &iter, parent); setRowText (&iter, 0, item->iconName(), 1, item->label(), this); -#if 0 // yast2-qt ignores `selected flag if (item->selected()) { if (hasMultiSelection()) setRowMark (&iter, 2, item->selected()); @@ -704,20 +703,19 @@ class YGTree : public YTree, public YGTreeView } if (((YTreeItem *) item)->isOpen()) expand (&iter); -#endif for (YItemConstIterator it = item->childrenBegin(); it != item->childrenEnd(); it++) addNode (*it, &iter); } -#if 0 + void expand (GtkTreeIter *iter) { GtkTreePath *path = gtk_tree_model_get_path (getModel(), iter); gtk_tree_view_expand_row (getView(), path, FALSE); gtk_tree_path_free (path); } - +#if 0 bool isReallyOpen (YTreeItem *item) // are parents open as well? { for (YTreeItem *i = item; i; i = i->parent())