Revision: 9 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=9&view=rev Author: frlan Date: 2008-05-13 11:10:59 -0700 (Tue, 13 May 2008)
Log Message: ----------- Move icon to left side of Quit-button
Modified Paths: -------------- trunk/geanysendmail/configure.in trunk/geanysendmail/geanysendmail.c
Modified: trunk/geanysendmail/configure.in =================================================================== --- trunk/geanysendmail/configure.in 2008-05-12 23:55:26 UTC (rev 8) +++ trunk/geanysendmail/configure.in 2008-05-13 18:10:59 UTC (rev 9) @@ -2,6 +2,7 @@
AC_PREREQ(2.59)
+ AC_INIT([geanysendmail], [0.4dev], [frank@frank.uvena.de])
AM_INIT_AUTOMAKE([1.9 foreign])
Modified: trunk/geanysendmail/geanysendmail.c =================================================================== --- trunk/geanysendmail/geanysendmail.c 2008-05-12 23:55:26 UTC (rev 8) +++ trunk/geanysendmail/geanysendmail.c 2008-05-13 18:10:59 UTC (rev 9) @@ -56,9 +56,9 @@ /* Needed global to remove from toolbar again */ GtkWidget *mailbutton = NULL; GtkWidget *separator = NULL; +GtkWidget *separator2 = NULL;
- void configure(GtkWidget *parent) { GtkWidget *dialog, *label1, *label2, *entry, *vbox; @@ -229,18 +229,28 @@
if (icon_in_toolbar == TRUE) { + + int number_of_icons = 0; + number_of_icons = gtk_toolbar_get_n_items(GTK_TOOLBAR(app->toolbar)); + pixbuf = gdk_pixbuf_new_from_inline(-1, mail_pixbuf, FALSE, NULL); icon = gtk_image_new_from_pixbuf(pixbuf); g_object_unref(pixbuf);
- separator = (GtkWidget*) gtk_separator_tool_item_new (); + separator = (GtkWidget*) gtk_separator_tool_item_new(); gtk_widget_show (separator); - gtk_container_add (GTK_CONTAINER (app->toolbar), separator); + gtk_toolbar_insert(GTK_TOOLBAR(app->toolbar), GTK_TOOL_ITEM(separator), number_of_icons - 2);
mailbutton = (GtkWidget*) gtk_tool_button_new (icon, "Mail"); - gtk_container_add (GTK_CONTAINER (app->toolbar), mailbutton); + gtk_toolbar_insert(GTK_TOOLBAR(app->toolbar), GTK_TOOL_ITEM(mailbutton), number_of_icons - 1); g_signal_connect (G_OBJECT(mailbutton), "clicked", G_CALLBACK(send_as_attachment), NULL); gtk_widget_show_all (mailbutton); + + separator2 = (GtkWidget*) gtk_separator_tool_item_new(); + gtk_widget_show (separator2); + gtk_toolbar_insert(GTK_TOOLBAR(app->toolbar), GTK_TOOL_ITEM(separator2), number_of_icons); + + }
// Build up menu @@ -277,6 +287,11 @@ { gtk_container_remove(GTK_CONTAINER (app->toolbar), separator); } + + if (separator2 != NULL) + { + gtk_container_remove(GTK_CONTAINER (app->toolbar), separator2); + } g_free(mailer); g_free(config_file); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org