Mailinglist Archive: yast-commit (2080 mails)

< Previous Next >
[yast-commit] r58616 - in /trunk/gtk: ChangeLog src/ygtkfindentry.c src/ygtkzyppview.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Thu, 10 Sep 2009 18:27:50 -0000
  • Message-id: <E1MloN4-0007d4-Bq@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Thu Sep 10 20:27:50 2009
New Revision: 58616

URL: http://svn.opensuse.org/viewcvs/yast?rev=58616&view=rev
Log:
* src/ygtkfindentry.c: bug fix: on resize find and erase
icons disapear (unrealize not implemented).

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/ygtkfindentry.c
trunk/gtk/src/ygtkzyppview.cc

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=58616&r1=58615&r2=58616&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Thu Sep 10 20:27:50 2009
@@ -1,5 +1,10 @@
2009-09-10 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

+ * src/ygtkfindentry.c: bug fix: on resize find and erase
+ icons disapear (unrealize not implemented).
+
+2009-09-10 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
* src/ygtkcellrendererbutton.c: look more like a button
when pressed.


Modified: trunk/gtk/src/ygtkfindentry.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkfindentry.c?rev=58616&r1=58615&r2=58616&view=diff
==============================================================================
--- trunk/gtk/src/ygtkfindentry.c (original)
+++ trunk/gtk/src/ygtkfindentry.c Thu Sep 10 20:27:50 2009
@@ -346,6 +346,19 @@
gdk_window_hide (eentry->right_window); // show when text is inserted
}

+static void ygtk_find_entry_unrealize (GtkWidget *widget)
+{
+ GTK_WIDGET_CLASS (ygtk_find_entry_parent_class)->unrealize (widget);
+
+ YGtkFindEntry *fentry = YGTK_FIND_ENTRY (widget);
+ generate_icon (NULL, NULL, &fentry->find_icon,
&fentry->find_hover_icon);
+ generate_icon (NULL, NULL, &fentry->clear_icon,
&fentry->clear_hover_icon);
+
+ YGtkExtEntry *eentry = YGTK_EXT_ENTRY (widget);
+ ygtk_ext_entry_set_border_window_size (eentry, YGTK_EXT_ENTRY_LEFT_WIN,
0);
+ ygtk_ext_entry_set_border_window_size (eentry,
YGTK_EXT_ENTRY_RIGHT_WIN, 0);
+}
+
static void ygtk_find_entry_map (GtkWidget *widget)
{
GTK_WIDGET_CLASS (ygtk_find_entry_parent_class)->map (widget);
@@ -633,6 +646,7 @@
{
GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS (klass);
gtkwidget_class->realize = ygtk_find_entry_realize;
+ gtkwidget_class->unrealize = ygtk_find_entry_unrealize;
gtkwidget_class->map = ygtk_find_entry_map;
gtkwidget_class->expose_event = ygtk_find_entry_expose;
gtkwidget_class->enter_notify_event =
ygtk_find_entry_enter_leave_notify_event;

Modified: trunk/gtk/src/ygtkzyppview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkzyppview.cc?rev=58616&r1=58615&r2=58616&view=diff
==============================================================================
--- trunk/gtk/src/ygtkzyppview.cc (original)
+++ trunk/gtk/src/ygtkzyppview.cc Thu Sep 10 20:27:50 2009
@@ -1488,9 +1488,11 @@
*m_authors, *m_support, *m_requires, *m_provides;
Versions *m_versions;
YGtkPackageView *m_contents;
+bool m_verMode;

public:
Impl (GtkWidget *scroll, bool onlineUpdate)
+ : m_verMode (false)
{
m_scroll = scroll;
m_versions = new Versions();
@@ -1536,10 +1538,11 @@
gtk_widget_set_size_request (GTK_WIDGET (m_contents),
-1, 150);
appendExpander (vbox, _("Applies to"), GTK_WIDGET
(m_contents));
}
-
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), versions_box, FALSE, TRUE,
0);
gtk_widget_show_all (hbox);
+ g_signal_connect (G_OBJECT (scroll), "hierarchy-changed",
+ G_CALLBACK (hierarchy_changed_cb), this);
}

~Impl()
@@ -1630,6 +1633,13 @@
setPackages (packages);
}

+ void setVerticalMode (bool verMode)
+ {
+ if (verMode != m_verMode) {
+ m_verMode = verMode;
+ }
+ }
+
private:
void scrollTop()
{
@@ -1720,6 +1730,15 @@

static void dirname_pressed_cb (GtkWidget *text, const gchar *link,
Impl *pThis)
{ OPEN_DIRNAME (link); }
+
+ static void hierarchy_changed_cb (GtkWidget *widget, GtkWidget *old,
Impl *pThis)
+ {
+ GtkWidget *parent = gtk_widget_get_parent (widget);
+ if (parent) {
+ bool vertical = GTK_IS_HPANED (parent) || GTK_IS_HBOX
(parent);
+ pThis->setVerticalMode (vertical);
+ }
+ }
};

G_DEFINE_TYPE (YGtkDetailView, ygtk_detail_view, GTK_TYPE_SCROLLED_WINDOW)

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

< Previous Next >
This Thread
  • No further messages