gimp r25391 - in trunk: . app/actions
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25391 - in trunk: . app/actions
- Date: Mon, 7 Apr 2008 14:38:52 +0100 (BST)
Author: neo
Date: Mon Apr 7 14:38:52 2008
New Revision: 25391
URL: http://svn.gnome.org/viewvc/gimp?rev=25391&view=rev
Log:
2008-04-07 Sven Neumann <sven gimp org>
* app/actions/templates-actions.c
* app/actions/templates-commands.c: when creating an image from a
template, skip the New Image dialog as suggested in bug #480802.
Modified:
trunk/ChangeLog
trunk/app/actions/templates-actions.c
trunk/app/actions/templates-commands.c
Modified: trunk/app/actions/templates-actions.c
==============================================================================
--- trunk/app/actions/templates-actions.c (original)
+++ trunk/app/actions/templates-actions.c Mon Apr 7 14:38:52 2008
@@ -43,7 +43,7 @@
GIMP_HELP_TEMPLATE_DIALOG },
{ "templates-create-image", GIMP_STOCK_IMAGE,
- N_("_Create Image from Template..."), "",
+ N_("_Create Image from Template"), "",
N_("Create a new image from the selected template"),
G_CALLBACK (templates_create_image_cmd_callback),
GIMP_HELP_TEMPLATE_IMAGE_NEW },
Modified: trunk/app/actions/templates-commands.c
==============================================================================
--- trunk/app/actions/templates-commands.c (original)
+++ trunk/app/actions/templates-commands.c Mon Apr 7 14:38:52 2008
@@ -31,6 +31,7 @@
#include "core/gimp-utils.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
+#include "core/gimpimage-new.h"
#include "core/gimptemplate.h"
#include "widgets/gimpcontainerview.h"
@@ -42,9 +43,9 @@
#include "widgets/gimptemplateview.h"
#include "dialogs/dialogs.h"
-#include "dialogs/image-new-dialog.h"
#include "dialogs/template-options-dialog.h"
+#include "actions.h"
#include "templates-commands.h"
#include "gimp-intl.h"
@@ -78,10 +79,12 @@
templates_create_image_cmd_callback (GtkAction *action,
gpointer data)
{
+ Gimp *gimp;
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
GimpContainer *container;
GimpContext *context;
GimpTemplate *template;
+ return_if_no_gimp(gimp,data);
container = gimp_container_view_get_container (editor->view);
context = gimp_container_view_get_context (editor->view);
@@ -90,19 +93,8 @@
if (template && gimp_container_have (container, GIMP_OBJECT (template)))
{
- GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (editor));
- GtkWidget *dialog;
-
- dialog = gimp_dialog_factory_dialog_new (global_dialog_factory, screen,
- "gimp-image-new-dialog",
- -1, FALSE);
-
- if (dialog)
- {
- image_new_dialog_set (dialog, NULL, template);
-
- gtk_window_present (GTK_WINDOW (dialog));
- }
+ gimp_template_create_image (gimp, template, context);
+ gimp_image_new_set_last_template (gimp, template);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]