SF.net SVN: geany-plugins:[1163] trunk/geany-plugins/geanyinsertnum

sheckley at users.sourceforge.net sheckley at xxxxx
Fri Mar 12 18:59:56 UTC 2010


Revision: 1163
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1163&view=rev
Author:   sheckley
Date:     2010-03-12 18:59:56 +0000 (Fri, 12 Mar 2010)

Log Message:
-----------
small changes to compile with GTK 2.8 / Win32

Modified Paths:
--------------
    trunk/geany-plugins/geanyinsertnum/README
    trunk/geany-plugins/geanyinsertnum/src/insertnum.c

Added Paths:
-----------
    trunk/geany-plugins/geanyinsertnum/ChangeLog

Added: trunk/geany-plugins/geanyinsertnum/ChangeLog
===================================================================
--- trunk/geany-plugins/geanyinsertnum/ChangeLog	                        (rev 0)
+++ trunk/geany-plugins/geanyinsertnum/ChangeLog	2010-03-12 18:59:56 UTC (rev 1163)
@@ -0,0 +1,4 @@
+2010-03-12  Dimitar Zhekov  <hamster at mbox.contact.bg>
+
+ * src/insertnum.c:
+   Small changes to compile with GTK 2.8 / Win32.

Modified: trunk/geany-plugins/geanyinsertnum/README
===================================================================
--- trunk/geany-plugins/geanyinsertnum/README	2010-03-12 11:05:59 UTC (rev 1162)
+++ trunk/geany-plugins/geanyinsertnum/README	2010-03-12 18:59:56 UTC (rev 1163)
@@ -11,7 +11,6 @@
 Requirements
 ------------
 Geany 0.18 or later and the respective headers and development libraries.
-Python 2.4 or later.
 
 
 Installation

Modified: trunk/geany-plugins/geanyinsertnum/src/insertnum.c
===================================================================
--- trunk/geany-plugins/geanyinsertnum/src/insertnum.c	2010-03-12 11:05:59 UTC (rev 1162)
+++ trunk/geany-plugins/geanyinsertnum/src/insertnum.c	2010-03-12 18:59:56 UTC (rev 1163)
@@ -119,9 +119,7 @@
 	return scintilla_send_message(sci, SCI_POINTXFROMPOSITION, 0, position);
 }
 
-/* these did not work for me in 0.18 */
-#define sci_get_line_end_position(sci, line) \
-	scintilla_send_message((sci), SCI_GETLINEENDPOSITION, (line), 0)
+/* these and sci_get_line_end_position() did not work for me in 0.18 */
 #define sci_get_pos_at_line_sel_start(sci, line) \
 	scintilla_send_message((sci), SCI_GETLINESELSTARTPOSITION, (line), 0)
 #define sci_goto_pos(sci, position) \
@@ -155,7 +153,7 @@
 	for (line = start_line, i = 0; line <= end_line; line++, i++)
 	{
           	if (sci_point_x_from_position(sci,
-			sci_get_line_end_position(sci, line)) >= xinsert)
+			scintilla_send_message(sci, SCI_GETLINEENDPOSITION, line, 0)) >= xinsert)
 		{
 			line_pos[i] = sci_get_pos_at_line_sel_start(sci, line) -
 				sci_get_position_from_line(sci, line);
@@ -214,7 +212,7 @@
 
 		beg = buffer;
 		end = buffer + length;
-		value = llabs(start);
+		value = ABS(start);
 
 		do
 		{
@@ -280,7 +278,7 @@
 
 	if (length == -1)
 		length = strlen(text);
-	result = g_new(gchar, gtk_entry_get_text_length(entry) + length + 1);
+	result = g_new(gchar, strlen(gtk_entry_get_text(entry)) + length + 1);
 	strcpy(result, gtk_entry_get_text(entry));
 
 	for (i = 0; i < length; i++)
@@ -359,7 +357,7 @@
 	gpointer gdata)
 {
 	InsertNumbersDialog d;
-	GtkWidget *vbox, *label, *upper, *space, *button, *action;
+	GtkWidget *vbox, *label, *upper, *space, *button;
 	GtkTable *table;
 	GtkComboBox *combo;
 	const char *case_tip = _("For base 11 and above");
@@ -432,9 +430,8 @@
 
 	button = gtk_button_new_from_stock(GTK_STOCK_OK);
 	g_signal_connect(button, "clicked", G_CALLBACK(on_insert_numbers_ok_clicked), &d);
-	action = gtk_dialog_get_action_area(GTK_DIALOG(d.dialog));
-	gtk_box_pack_end(GTK_BOX(action), button, TRUE, TRUE, 0);
-	gtk_widget_set_can_default(button, TRUE);
+	gtk_box_pack_end(GTK_BOX(GTK_DIALOG(d.dialog)->action_area), button, TRUE, TRUE, 0);
+	GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
 	gtk_widget_grab_default(button);
 
 	gtk_entry_set_text(GTK_ENTRY(d.start), start_text);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list