[Goodies-commits] r3747 - in ristretto/trunk: po src
Stephan Arts
stephan at xfce.org
Mon Dec 24 01:00:48 CET 2007
Author: stephan
Date: 2007-12-24 00:00:48 +0000 (Mon, 24 Dec 2007)
New Revision: 3747
Modified:
ristretto/trunk/po/Makevars
ristretto/trunk/src/navigator.c
ristretto/trunk/src/thumbnail.c
ristretto/trunk/src/thumbnail_bar.c
Log:
Improve thumbnail-bar a bit more
put xfce-i18n m/l in Makevars file
Modified: ristretto/trunk/po/Makevars
===================================================================
--- ristretto/trunk/po/Makevars 2007-12-23 23:04:07 UTC (rev 3746)
+++ ristretto/trunk/po/Makevars 2007-12-24 00:00:48 UTC (rev 3747)
@@ -34,7 +34,7 @@
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
-MSGID_BUGS_ADDRESS = stephan at xfce.org
+MSGID_BUGS_ADDRESS = xfce-i18n at xfce.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
Modified: ristretto/trunk/src/navigator.c
===================================================================
--- ristretto/trunk/src/navigator.c 2007-12-23 23:04:07 UTC (rev 3746)
+++ ristretto/trunk/src/navigator.c 2007-12-24 00:00:48 UTC (rev 3747)
@@ -606,7 +606,6 @@
if (navigator->preload)
{
GList *next = g_list_next(navigator->file_iter);
- g_debug("preload: %d", g_list_position(navigator->file_list, next));
if (next == NULL)
{
next = navigator->file_list;
@@ -910,7 +909,6 @@
GdkPixbuf *
rstto_navigator_entry_get_pixbuf (RsttoNavigatorEntry *entry)
{
- g_debug("%s", __FUNCTION__);
return entry->src_pixbuf;
}
Modified: ristretto/trunk/src/thumbnail.c
===================================================================
--- ristretto/trunk/src/thumbnail.c 2007-12-23 23:04:07 UTC (rev 3746)
+++ ristretto/trunk/src/thumbnail.c 2007-12-24 00:00:48 UTC (rev 3747)
@@ -137,7 +137,11 @@
if (GTK_WIDGET_REALIZED (widget))
{
+ GdkRegion *region = event->region;
+
+ gdk_window_begin_paint_region(widget->window, region);
rstto_thumbnail_paint(thumb);
+ gdk_window_end_paint(widget->window);
}
return FALSE;
Modified: ristretto/trunk/src/thumbnail_bar.c
===================================================================
--- ristretto/trunk/src/thumbnail_bar.c 2007-12-23 23:04:07 UTC (rev 3746)
+++ ristretto/trunk/src/thumbnail_bar.c 2007-12-24 00:00:48 UTC (rev 3747)
@@ -47,6 +47,8 @@
rstto_thumbnail_bar_size_request(GtkWidget *, GtkRequisition *);
static void
rstto_thumbnail_bar_size_allocate(GtkWidget *, GtkAllocation *);
+static gboolean
+rstto_thumbnail_bar_expose(GtkWidget *, GdkEventExpose *);
static void
rstto_thumbnail_bar_add(GtkContainer *container, GtkWidget *child);
@@ -133,6 +135,7 @@
widget_class->size_request = rstto_thumbnail_bar_size_request;
widget_class->size_allocate = rstto_thumbnail_bar_size_allocate;
+ widget_class->expose_event = rstto_thumbnail_bar_expose;
container_class->add = rstto_thumbnail_bar_add;
container_class->remove = rstto_thumbnail_bar_remove;
@@ -289,6 +292,71 @@
}
}
+static gboolean
+rstto_thumbnail_bar_expose(GtkWidget *widget, GdkEventExpose *ex)
+{
+ RsttoThumbnailBar *bar = RSTTO_THUMBNAIL_BAR(widget);
+
+ GSList *iter = bar->priv->thumbs;
+
+ GdkEventExpose *n_ex = g_new0(GdkEventExpose, 1);
+
+ n_ex->type = ex->type;
+ n_ex->window = ex->window;
+ n_ex->send_event = ex->send_event;
+ n_ex->area.x = GTK_WIDGET(bar)->allocation.x;
+ n_ex->area.y = GTK_WIDGET(bar)->allocation.y;
+ n_ex->area.width = ex->area.width;
+ n_ex->area.height = ex->area.height;
+ n_ex->count = ex->count;
+
+ while(iter)
+ {
+ if (GTK_WIDGET_VISIBLE(iter->data) == TRUE)
+ {
+ switch (bar->priv->orientation)
+ {
+ case GTK_ORIENTATION_HORIZONTAL:
+ if ((GTK_WIDGET(bar)->allocation.x + (GTK_WIDGET(bar)->allocation.width)) <
+ (GTK_WIDGET(iter->data)->allocation.x + GTK_WIDGET(iter->data)->allocation.width))
+ {
+ n_ex->area.x = GTK_WIDGET(iter->data)->allocation.x;
+ n_ex->area.width = (GTK_WIDGET(bar)->allocation.x + GTK_WIDGET(bar)->allocation.width) - n_ex->area.x;
+ }
+ else
+ {
+ n_ex->area.x = GTK_WIDGET(bar)->allocation.x;
+ n_ex->area.width = ex->area.width;
+ }
+ break;
+ break;
+ case GTK_ORIENTATION_VERTICAL:
+ if ((GTK_WIDGET(bar)->allocation.y + GTK_WIDGET(bar)->allocation.height) <
+ (GTK_WIDGET(iter->data)->allocation.y + GTK_WIDGET(iter->data)->allocation.height))
+ {
+ n_ex->area.y = GTK_WIDGET(iter->data)->allocation.y;
+ n_ex->area.height = (GTK_WIDGET(bar)->allocation.y + GTK_WIDGET(bar)->allocation.height) - n_ex->area.y;
+ g_debug("%d:%d", (GTK_WIDGET(bar)->allocation.y + GTK_WIDGET(bar)->allocation.height),GTK_WIDGET(iter->data)->allocation.y + GTK_WIDGET(iter->data)->allocation.height);
+ }
+ else
+ {
+ n_ex->area.y = GTK_WIDGET(bar)->allocation.y;
+ n_ex->area.height = ex->area.height;
+ g_debug("B");
+ }
+ break;
+ }
+ if (n_ex->region)
+ gdk_region_destroy(n_ex->region);
+ n_ex->region = gdk_region_rectangle(&(n_ex->area));
+ gtk_container_propagate_expose(GTK_CONTAINER(widget), GTK_WIDGET(iter->data), n_ex);
+ }
+ iter = g_slist_next(iter);
+ }
+
+ return FALSE;
+}
+
GtkWidget *
rstto_thumbnail_bar_new(RsttoNavigator *navigator)
{
@@ -431,7 +499,6 @@
}
iter = g_slist_next(iter);
}
-
/* If the children should be autocentered... resize */
if (bar->priv->auto_center == TRUE)
gtk_widget_queue_resize(GTK_WIDGET(bar));
More information about the Goodies-commits
mailing list