SF.net SVN: geany-plugins:[351] trunk/geanylipsum/src/geanylipsum.c
frlan at users.sourceforge.net
frlan at xxxxx
Mon Dec 22 22:08:12 UTC 2008
Revision: 351
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=351&view=rev
Author: frlan
Date: 2008-12-22 22:08:12 +0000 (Mon, 22 Dec 2008)
Log Message:
-----------
GeanyLipsum: Added a option to insert complete unformated lipsum text
Modified Paths:
--------------
trunk/geanylipsum/src/geanylipsum.c
Modified: trunk/geanylipsum/src/geanylipsum.c
===================================================================
--- trunk/geanylipsum/src/geanylipsum.c 2008-12-22 22:07:46 UTC (rev 350)
+++ trunk/geanylipsum/src/geanylipsum.c 2008-12-22 22:08:12 UTC (rev 351)
@@ -60,6 +60,12 @@
#define CONTENT "\
{{B_CONTENT}}"
+enum {
+ PLAIN_LIPSUM = 0,
+ HTML_LIPSUM,
+ LATEX_LIPSUM
+};
+
GeanyPlugin *geany_plugin;
GeanyData *geany_data;
GeanyFunctions *geany_functions;
@@ -91,7 +97,8 @@
GtkWidget *dialog = NULL;
GtkWidget *vbox = NULL;
GtkWidget *radio1 = NULL;
- GtkWidget *radio2= NULL;
+ GtkWidget *radio2 = NULL;
+ GtkWidget *radio3 = NULL;
GtkTooltips *tooltip = NULL;
tooltip = gtk_tooltips_new();
@@ -113,6 +120,11 @@
gtk_button_set_focus_on_click(GTK_BUTTON(radio2), FALSE);
gtk_container_add(GTK_CONTAINER(vbox), radio2);
+ radio3 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio1),
+ _("Plain"));
+ gtk_button_set_focus_on_click(GTK_BUTTON(radio3), FALSE);
+ gtk_container_add(GTK_CONTAINER(vbox), radio3);
+
gtk_widget_show_all(vbox);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
@@ -121,12 +133,17 @@
// Filetyp
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio1)))
{
- type = 0;
+ type = HTML_LIPSUM;
}
+ else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio2)))
+ {
+ type = LATEX_LIPSUM;
+ }
else
{
- type = 1;
+ type = PLAIN_LIPSUM;
}
+
// Number of titles/paragraphes etc.
// t.b.d.
gtk_widget_destroy(dialog);
@@ -138,8 +155,8 @@
gtk_widget_destroy(dialog);
}
-
+
}
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