use gtk_about_dialog instead of home-brewn stuff.

2005-05-28  Maurits Rijk  <m.rijk@chello.nl>

	* plug-ins/imagemap/imap_about.c: use gtk_about_dialog instead of
	home-brewn stuff.

	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_menu.c: minor clean-up.
This commit is contained in:
Maurits Rijk 2005-05-28 18:13:18 +00:00 committed by Maurits Rijk
parent 4b10d69d66
commit 3ee2a3a0aa
4 changed files with 47 additions and 26 deletions

View File

@ -1,3 +1,11 @@
2005-05-28 Maurits Rijk <m.rijk@chello.nl>
* plug-ins/imagemap/imap_about.c: use gtk_about_dialog instead of
home-brewn stuff.
* plug-ins/imagemap/imap_main.c
* plug-ins/imagemap/imap_menu.c: minor clean-up.
2005-05-27 Sven Neumann <sven@gimp.org>
* (lots of files): Use the canonical form for signal names.

View File

@ -26,24 +26,30 @@
#include <gtk/gtk.h>
#include "imap_about.h"
#include "imap_default_dialog.h"
#include "libgimp/stdplugins-intl.h"
void
do_about_dialog(void)
{
static DefaultDialog_t *dialog;
static GtkWidget *dialog;
if (!dialog)
{
dialog = make_default_dialog (_("About"));
default_dialog_hide_cancel_button (dialog);
default_dialog_hide_apply_button (dialog);
default_dialog_hide_help_button (dialog);
default_dialog_set_label (dialog, _("Imagemap plug-in 2.3"));
default_dialog_set_label (dialog, _("Copyright(c) 1999-2005 by Maurits Rijk"));
default_dialog_set_label (dialog, "m.rijk@chello.nl");
default_dialog_set_label (dialog, _("Released under the GNU General Public License"));
const gchar* authors[] = {"Maurits Rijk (m.rijk@chello.nl)", NULL};
dialog = gtk_about_dialog_new ();
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (dialog), "Imagemap plug-in");
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), "2.3");
gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog),
_("Copyright(c) 1999-2005 by Maurits Rijk"));
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors);
gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog),
_("Released under the GNU General Public License"));
g_signal_connect (dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&dialog);
}
default_dialog_show (dialog);
gtk_widget_show (dialog);
}

View File

@ -1270,6 +1270,18 @@ do_move_down(void)
*/
}
void
do_use_gimp_guides_dialog(void)
{
command_execute (gimp_guides_command_new (_shapes, _drawable));
}
void
do_create_guides_dialog(void)
{
command_execute (guides_command_new (_shapes));
}
#ifdef _NOT_READY_YET_
static Command_t*
@ -1302,17 +1314,6 @@ factory_send_to_back(void)
return send_to_back_command_new(_shapes);
}
static Command_t*
factory_create_guides_dialog(void)
{
return guides_command_new(_shapes);
}
static Command_t*
factory_use_gimp_guides_dialog(void)
{
return gimp_guides_command_new(_shapes, _drawable);
}
#endif
static Command_t*

View File

@ -56,6 +56,9 @@ void do_grid_settings_dialog();
void do_zoom_in();
void do_zoom_out();
void do_edit_selected_shape();
void do_create_guides_dialog();
void do_use_gimp_guides_dialog();
void imap_help();
void set_func(int func);
@ -197,12 +200,15 @@ static GtkActionEntry entries[] = {
{ "ToolsMenu", NULL, "_Tools" },
{ "GridSettings", NULL, "Grid Settings...", NULL, NULL,
do_grid_settings_dialog},
{ "UseGimpGuides", NULL, "Use GIMP Guides...", NULL, NULL, NULL},
{ "CreateGuides", NULL, "Create Guides...", NULL, NULL, NULL},
{ "UseGimpGuides", NULL, "Use GIMP Guides...", NULL, NULL,
do_use_gimp_guides_dialog},
{ "CreateGuides", NULL, "Create Guides...", NULL, NULL,
do_create_guides_dialog},
{ "HelpMenu", NULL, "_Help" },
{ "Contents", NULL, "_Contents", NULL, NULL, imap_help},
{ "About", NULL, "_About ImageMap...", NULL, NULL, do_about_dialog},
{ "Contents", GTK_STOCK_HELP, "_Contents", NULL, NULL, imap_help},
{ "About", GTK_STOCK_ABOUT, "_About ImageMap...", NULL, NULL,
do_about_dialog},
{ "ZoomMenu", NULL, "_Zoom" },
};