dia r3960 - in trunk: . lib objects/standard



Author: hans
Date: Sun Apr 27 08:58:16 2008
New Revision: 3960
URL: http://svn.gnome.org/viewvc/dia?rev=3960&view=rev

Log:
2008-04-27  Hans Breuer  <hans breuer org>

	* lib/prop_widgets.c : set the unfoldbutton to insensitive when
	invisible to stop propagating key events to it. Fixes bug #491028
	* objects/standard/(bezier|line|polyline).c : added 
	PROP_OFFSET_FRAME_BEGIN("gaps"), PROP_OFFSET_FRAME_END("gaps")
	to get symmetry between PropDescriptions and PropOffsets
	
	* lib/widgets.c : no more singned/unsigned mismatch and get rid of
	incompatible types - from 'struct _GtkWidget *' to 
	'struct _GtkFileSelection *', the DiaFileSelector::dialog is a
	GtkFileChooser for quite a long time


Modified:
   trunk/ChangeLog
   trunk/lib/prop_widgets.c
   trunk/lib/widgets.c
   trunk/objects/standard/bezier.c
   trunk/objects/standard/line.c
   trunk/objects/standard/polyline.c

Modified: trunk/lib/prop_widgets.c
==============================================================================
--- trunk/lib/prop_widgets.c	(original)
+++ trunk/lib/prop_widgets.c	Sun Apr 27 08:58:16 2008
@@ -111,11 +111,13 @@
   struct FoldButtonInfo *info = (struct FoldButtonInfo *)userdata;
   
   if (button1 == info->unfoldbutton) {
+    gtk_widget_set_sensitive (info->unfoldbutton, FALSE);
     gtk_widget_hide(info->unfoldbutton);
     gtk_widget_show(info->frame);
   } else {
     gtk_widget_hide(info->frame);
     gtk_widget_show(info->unfoldbutton);
+    gtk_widget_set_sensitive (info->unfoldbutton, TRUE);
   }
 }
 
@@ -141,6 +143,7 @@
 
   gtk_container_set_border_width (GTK_CONTAINER(frame), 2);
   gtk_container_add(GTK_CONTAINER(frame),vbox);
+  gtk_widget_set_sensitive (unfoldbutton, FALSE);
   gtk_widget_show(foldbutton);
   gtk_widget_show(frame);
   gtk_widget_show(vbox);

Modified: trunk/lib/widgets.c
==============================================================================
--- trunk/lib/widgets.c	(original)
+++ trunk/lib/widgets.c	Sun Apr 27 08:58:16 2008
@@ -534,9 +534,10 @@
 				 PangoFontFamily *pff,
 				 DiaFontStyle dia_style)
 {
-  int i=0, select = 0;
+  int select = 0;
   PangoFontFace **faces = NULL;
-  int nfaces = 0;
+  guint nfaces = 0;
+  guint i=0;
   GtkWidget *menu = NULL;
   long stylebits = 0;
   int menu_item_nr = 0;
@@ -1347,7 +1348,7 @@
   GtkHBox hbox;
   GtkEntry *entry;
   GtkButton *browse;
-  GtkFileSelection *dialog;
+  GtkWidget *dialog;
   gchar *sys_filename;
 };
 
@@ -1438,7 +1439,7 @@
   if (fs->dialog == NULL) {
     GtkFileFilter *filter;
     
-    dialog = fs->dialog =
+    dialog = fs->dialog = 
       gtk_file_chooser_dialog_new (_("Select image file"), toplevel ? GTK_WINDOW(toplevel) : NULL,
                                    GTK_FILE_CHOOSER_ACTION_OPEN,
                                    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,

Modified: trunk/objects/standard/bezier.c
==============================================================================
--- trunk/objects/standard/bezier.c	(original)
+++ trunk/objects/standard/bezier.c	Sun Apr 27 08:58:16 2008
@@ -161,8 +161,10 @@
     offsetof(Bezierline, line_style), offsetof(Bezierline, dashlength) },
   { "start_arrow", PROP_TYPE_ARROW, offsetof(Bezierline, start_arrow) },
   { "end_arrow", PROP_TYPE_ARROW, offsetof(Bezierline, end_arrow) },
+  PROP_OFFSET_FRAME_BEGIN("gaps"),
   { "absolute_start_gap", PROP_TYPE_REAL, offsetof(Bezierline, absolute_start_gap) },
   { "absolute_end_gap", PROP_TYPE_REAL, offsetof(Bezierline, absolute_end_gap) },
+  PROP_OFFSET_FRAME_END("gaps"),
   { NULL, 0, 0 }
 };
 

Modified: trunk/objects/standard/line.c
==============================================================================
--- trunk/objects/standard/line.c	(original)
+++ trunk/objects/standard/line.c	Sun Apr 27 08:58:16 2008
@@ -168,8 +168,10 @@
   { "end_arrow", PROP_TYPE_ARROW, offsetof(Line, end_arrow) },
   { "start_point", PROP_TYPE_POINT, offsetof(Connection, endpoints[0]) },
   { "end_point", PROP_TYPE_POINT, offsetof(Connection, endpoints[1]) },
+  PROP_OFFSET_FRAME_BEGIN("gaps"),
   { "absolute_start_gap", PROP_TYPE_REAL, offsetof(Line, absolute_start_gap) },
   { "absolute_end_gap", PROP_TYPE_REAL, offsetof(Line, absolute_end_gap) },
+  PROP_OFFSET_FRAME_END("gaps"),
   { NULL, 0, 0 }
 };
 

Modified: trunk/objects/standard/polyline.c
==============================================================================
--- trunk/objects/standard/polyline.c	(original)
+++ trunk/objects/standard/polyline.c	Sun Apr 27 08:58:16 2008
@@ -160,8 +160,10 @@
   { "start_arrow", PROP_TYPE_ARROW, offsetof(Polyline, start_arrow) },
   { "end_arrow", PROP_TYPE_ARROW, offsetof(Polyline, end_arrow) },
   { "corner_radius", PROP_TYPE_REAL, offsetof(Polyline, corner_radius) },
+  PROP_OFFSET_FRAME_BEGIN("gaps"),
   { "absolute_start_gap", PROP_TYPE_REAL, offsetof(Polyline, absolute_start_gap) },
   { "absolute_end_gap", PROP_TYPE_REAL, offsetof(Polyline, absolute_end_gap) },
+  PROP_OFFSET_FRAME_END("gaps"),
   { NULL, 0, 0 }
 };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]