Revision: 1462
http://geeqie.svn.sourceforge.net/geeqie/?rev=1462&view=rev
Author: nadvornik
Date: 2009-03-01 21:35:18 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
make the exif pane grow-only - this reduces sidebar jumping
Modified Paths:
--------------
trunk/src/bar_exif.c
Modified: trunk/src/bar_exif.c
===================================================================
--- trunk/src/bar_exif.c 2009-03-01 21:06:55 UTC (rev 1461)
+++ trunk/src/bar_exif.c 2009-03-01 21:35:18 UTC (rev 1462)
@@ -26,6 +26,7 @@
#include <math.h>
+#define MIN_HEIGHT 25
/*
*-------------------------------------------------------------------
* EXIF widget
@@ -54,6 +55,8 @@
GtkWidget *widget;
GtkSizeGroup *size_group;
+ gint min_height;
+
FileData *fd;
};
@@ -257,6 +260,21 @@
g_free(ped);
}
+static void bar_pane_exif_size_request(GtkWidget *pane, GtkRequisition
*requisition, gpointer data)
+{
+ PaneExifData *ped = data;
+ if (requisition->height < ped->min_height)
+ {
+ requisition->height = ped->min_height;
+ }
+}
+
+static void bar_pane_exif_size_allocate(GtkWidget *pane, GtkAllocation *alloc,
gpointer data)
+{
+ PaneExifData *ped = data;
+ ped->min_height = alloc->height;
+}
+
GtkWidget *bar_pane_exif_new(const gchar *title, gboolean expanded, gboolean
populate)
{
PaneExifData *ped;
@@ -271,11 +289,15 @@
ped->size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
ped->vbox = gtk_vbox_new(FALSE, PREF_PAD_GAP);
ped->widget = ped->vbox;
+ ped->min_height = MIN_HEIGHT;
g_object_set_data(G_OBJECT(ped->widget), "pane_data", ped);
g_signal_connect_after(G_OBJECT(ped->widget), "destroy",
G_CALLBACK(bar_pane_exif_destroy), ped);
+ g_signal_connect(G_OBJECT(ped->widget), "size-request",
+ G_CALLBACK(bar_pane_exif_size_request), ped);
+ g_signal_connect(G_OBJECT(ped->widget), "size-allocate",
+ G_CALLBACK(bar_pane_exif_size_allocate), ped);
-
if (populate)
{
bar_pane_exif_add_entry(ped, EXIF_FORMATTED("Camera"), NULL,
TRUE);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn