Updated new files from upstream
This commit is contained in:
parent
3bbdd873ef
commit
852cbfc1fb
|
@ -0,0 +1,243 @@
|
|||
/* PIKA - Photo and Image Kooker Application
|
||||
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||
*
|
||||
* Original copyright, applying to most contents (license remains unchanged):
|
||||
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* NOTE: This file is auto-generated by pdbgen.pl. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "stamp-pdbgen.h"
|
||||
|
||||
#include <gegl.h>
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libpikabase/pikabase.h"
|
||||
|
||||
#include "pdb-types.h"
|
||||
|
||||
#include "core/pika.h"
|
||||
#include "core/pikadatafactory.h"
|
||||
#include "core/pikadrawable.h"
|
||||
#include "core/pikaparamspecs.h"
|
||||
|
||||
#include "pikapdb.h"
|
||||
#include "pikaprocedure.h"
|
||||
#include "internal-procs.h"
|
||||
|
||||
|
||||
static PikaValueArray *
|
||||
drawables_popup_invoker (PikaProcedure *procedure,
|
||||
Pika *pika,
|
||||
PikaContext *context,
|
||||
PikaProgress *progress,
|
||||
const PikaValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
const gchar *callback;
|
||||
const gchar *popup_title;
|
||||
const gchar *drawable_type;
|
||||
PikaDrawable *initial_drawable;
|
||||
GBytes *parent_window;
|
||||
|
||||
callback = g_value_get_string (pika_value_array_index (args, 0));
|
||||
popup_title = g_value_get_string (pika_value_array_index (args, 1));
|
||||
drawable_type = g_value_get_string (pika_value_array_index (args, 2));
|
||||
initial_drawable = g_value_get_object (pika_value_array_index (args, 3));
|
||||
parent_window = g_value_get_boxed (pika_value_array_index (args, 4));
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (pika->no_interface ||
|
||||
! pika_pdb_lookup_procedure (pika->pdb, callback) ||
|
||||
! pika_pdb_dialog_new (pika, context, progress,
|
||||
g_type_from_name (drawable_type),
|
||||
parent_window, popup_title, callback,
|
||||
PIKA_OBJECT (initial_drawable),
|
||||
NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
return pika_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static PikaValueArray *
|
||||
drawables_close_popup_invoker (PikaProcedure *procedure,
|
||||
Pika *pika,
|
||||
PikaContext *context,
|
||||
PikaProgress *progress,
|
||||
const PikaValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
const gchar *callback;
|
||||
|
||||
callback = g_value_get_string (pika_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (pika->no_interface ||
|
||||
! pika_pdb_lookup_procedure (pika->pdb, callback) ||
|
||||
! pika_pdb_dialog_close (pika, PIKA_TYPE_DRAWABLE, callback))
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
return pika_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static PikaValueArray *
|
||||
drawables_set_popup_invoker (PikaProcedure *procedure,
|
||||
Pika *pika,
|
||||
PikaContext *context,
|
||||
PikaProgress *progress,
|
||||
const PikaValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
const gchar *callback;
|
||||
PikaDrawable *drawable;
|
||||
|
||||
callback = g_value_get_string (pika_value_array_index (args, 0));
|
||||
drawable = g_value_get_object (pika_value_array_index (args, 1));
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (pika->no_interface ||
|
||||
! pika_pdb_lookup_procedure (pika->pdb, callback) ||
|
||||
! pika_pdb_dialog_set (pika, PIKA_TYPE_DRAWABLE, callback, PIKA_OBJECT (drawable), NULL))
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
return pika_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
void
|
||||
register_drawable_select_procs (PikaPDB *pdb)
|
||||
{
|
||||
PikaProcedure *procedure;
|
||||
|
||||
/*
|
||||
* pika-drawables-popup
|
||||
*/
|
||||
procedure = pika_procedure_new (drawables_popup_invoker);
|
||||
pika_object_set_static_name (PIKA_OBJECT (procedure),
|
||||
"pika-drawables-popup");
|
||||
pika_procedure_set_static_help (procedure,
|
||||
"Invokes the drawable selection dialog.",
|
||||
"Opens a dialog letting a user choose an drawable.",
|
||||
NULL);
|
||||
pika_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2023");
|
||||
pika_procedure_add_argument (procedure,
|
||||
pika_param_spec_string ("callback",
|
||||
"callback",
|
||||
"The callback PDB proc to call when user chooses an drawable",
|
||||
FALSE, FALSE, TRUE,
|
||||
NULL,
|
||||
PIKA_PARAM_READWRITE));
|
||||
pika_procedure_add_argument (procedure,
|
||||
pika_param_spec_string ("popup-title",
|
||||
"popup title",
|
||||
"Title of the drawable selection dialog",
|
||||
FALSE, FALSE, FALSE,
|
||||
NULL,
|
||||
PIKA_PARAM_READWRITE));
|
||||
pika_procedure_add_argument (procedure,
|
||||
pika_param_spec_string ("drawable-type",
|
||||
"drawable type",
|
||||
"The name of the PIKA_TYPE_DRAWABLE subtype",
|
||||
FALSE, FALSE, TRUE,
|
||||
NULL,
|
||||
PIKA_PARAM_READWRITE));
|
||||
pika_procedure_add_argument (procedure,
|
||||
pika_param_spec_drawable ("initial-drawable",
|
||||
"initial drawable",
|
||||
"The drawable to set as the initial choice",
|
||||
FALSE,
|
||||
PIKA_PARAM_READWRITE | PIKA_PARAM_NO_VALIDATE));
|
||||
pika_procedure_add_argument (procedure,
|
||||
g_param_spec_boxed ("parent-window",
|
||||
"parent window",
|
||||
"An optional parent window handle for the popup to be set transient to",
|
||||
G_TYPE_BYTES,
|
||||
PIKA_PARAM_READWRITE));
|
||||
pika_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* pika-drawables-close-popup
|
||||
*/
|
||||
procedure = pika_procedure_new (drawables_close_popup_invoker);
|
||||
pika_object_set_static_name (PIKA_OBJECT (procedure),
|
||||
"pika-drawables-close-popup");
|
||||
pika_procedure_set_static_help (procedure,
|
||||
"Close the drawable selection dialog.",
|
||||
"Closes an open drawable selection dialog.",
|
||||
NULL);
|
||||
pika_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2023");
|
||||
pika_procedure_add_argument (procedure,
|
||||
pika_param_spec_string ("callback",
|
||||
"callback",
|
||||
"The name of the callback registered for this pop-up",
|
||||
FALSE, FALSE, TRUE,
|
||||
NULL,
|
||||
PIKA_PARAM_READWRITE));
|
||||
pika_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* pika-drawables-set-popup
|
||||
*/
|
||||
procedure = pika_procedure_new (drawables_set_popup_invoker);
|
||||
pika_object_set_static_name (PIKA_OBJECT (procedure),
|
||||
"pika-drawables-set-popup");
|
||||
pika_procedure_set_static_help (procedure,
|
||||
"Sets the selected drawable in a drawable selection dialog.",
|
||||
"Sets the selected drawable in a drawable selection dialog.",
|
||||
NULL);
|
||||
pika_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2023");
|
||||
pika_procedure_add_argument (procedure,
|
||||
pika_param_spec_string ("callback",
|
||||
"callback",
|
||||
"The name of the callback registered for this pop-up",
|
||||
FALSE, FALSE, TRUE,
|
||||
NULL,
|
||||
PIKA_PARAM_READWRITE));
|
||||
pika_procedure_add_argument (procedure,
|
||||
pika_param_spec_drawable ("drawable",
|
||||
"drawable",
|
||||
"The drawable to set as selected",
|
||||
FALSE,
|
||||
PIKA_PARAM_READWRITE | PIKA_PARAM_NO_VALIDATE));
|
||||
pika_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
}
|
|
@ -0,0 +1,589 @@
|
|||
/* PIKA - Photo and Image Kooker Application
|
||||
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||
*
|
||||
* Original copyright, applying to most contents (license remains unchanged):
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* pikapickablechooser.c
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include "libpikabase/pikabase.h"
|
||||
#include "libpikawidgets/pikawidgets.h"
|
||||
|
||||
#include "widgets-types.h"
|
||||
|
||||
#include "core/pika.h"
|
||||
#include "core/pikachannel.h"
|
||||
#include "core/pikacontext.h"
|
||||
#include "core/pikaimage.h"
|
||||
#include "core/pikalayer.h"
|
||||
#include "core/pikapickable.h"
|
||||
#include "core/pikaviewable.h"
|
||||
|
||||
#include "pikacontainertreeview.h"
|
||||
#include "pikacontainerview.h"
|
||||
#include "pikapickablechooser.h"
|
||||
#include "pikaviewrenderer.h"
|
||||
|
||||
#include "pika-intl.h"
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
ACTIVATE,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_CONTEXT,
|
||||
PROP_PICKABLE_TYPE,
|
||||
PROP_PICKABLE,
|
||||
PROP_VIEW_SIZE,
|
||||
PROP_VIEW_BORDER_WIDTH
|
||||
};
|
||||
|
||||
struct _PikaPickableChooserPrivate
|
||||
{
|
||||
GType pickable_type;
|
||||
PikaPickable *pickable;
|
||||
PikaContext *context;
|
||||
|
||||
gint view_size;
|
||||
gint view_border_width;
|
||||
|
||||
GtkWidget *image_view;
|
||||
GtkWidget *layer_view;
|
||||
GtkWidget *channel_view;
|
||||
GtkWidget *layer_label;
|
||||
};
|
||||
|
||||
|
||||
static void pika_pickable_chooser_constructed (GObject *object);
|
||||
static void pika_pickable_chooser_finalize (GObject *object);
|
||||
static void pika_pickable_chooser_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void pika_pickable_chooser_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void pika_pickable_chooser_image_changed (PikaContext *context,
|
||||
PikaImage *image,
|
||||
PikaPickableChooser *chooser);
|
||||
static void pika_pickable_chooser_item_activate (PikaContainerView *view,
|
||||
PikaPickable *pickable,
|
||||
gpointer unused,
|
||||
PikaPickableChooser *chooser);
|
||||
static void pika_pickable_chooser_items_selected (PikaContainerView *view,
|
||||
GList *items,
|
||||
GList *paths,
|
||||
PikaPickableChooser *chooser);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (PikaPickableChooser, pika_pickable_chooser, GTK_TYPE_FRAME)
|
||||
|
||||
#define parent_class pika_pickable_chooser_parent_class
|
||||
|
||||
static guint signals[LAST_SIGNAL];
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_class_init (PikaPickableChooserClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->constructed = pika_pickable_chooser_constructed;
|
||||
object_class->finalize = pika_pickable_chooser_finalize;
|
||||
object_class->get_property = pika_pickable_chooser_get_property;
|
||||
object_class->set_property = pika_pickable_chooser_set_property;
|
||||
|
||||
/**
|
||||
* PikaPickableChooser::activate:
|
||||
* @chooser:
|
||||
*
|
||||
* Emitted when a pickable is activated, which is mostly forwarding when
|
||||
* "activate-item" signal is emitted from any of either the image, layer or
|
||||
* channel view. E.g. this happens when one double-click on one of the
|
||||
* pickables.
|
||||
*/
|
||||
signals[ACTIVATE] =
|
||||
g_signal_new ("activate",
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (PikaPickableChooserClass, activate),
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
PIKA_TYPE_OBJECT);
|
||||
|
||||
g_object_class_install_property (object_class, PROP_CONTEXT,
|
||||
g_param_spec_object ("context",
|
||||
NULL, NULL,
|
||||
PIKA_TYPE_CONTEXT,
|
||||
PIKA_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_PICKABLE_TYPE,
|
||||
g_param_spec_gtype ("pickable-type",
|
||||
NULL, NULL,
|
||||
PIKA_TYPE_PICKABLE,
|
||||
PIKA_PARAM_WRITABLE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_PICKABLE,
|
||||
g_param_spec_object ("pickable",
|
||||
NULL, NULL,
|
||||
PIKA_TYPE_PICKABLE,
|
||||
PIKA_PARAM_READWRITE |
|
||||
G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_VIEW_SIZE,
|
||||
g_param_spec_int ("view-size",
|
||||
NULL, NULL,
|
||||
1, PIKA_VIEWABLE_MAX_PREVIEW_SIZE,
|
||||
PIKA_VIEW_SIZE_MEDIUM,
|
||||
PIKA_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_VIEW_BORDER_WIDTH,
|
||||
g_param_spec_int ("view-border-width",
|
||||
NULL, NULL,
|
||||
0,
|
||||
PIKA_VIEW_MAX_BORDER_WIDTH,
|
||||
1,
|
||||
PIKA_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_init (PikaPickableChooser *chooser)
|
||||
{
|
||||
chooser->priv = pika_pickable_chooser_get_instance_private (chooser);
|
||||
|
||||
chooser->priv->view_size = PIKA_VIEW_SIZE_SMALL;
|
||||
chooser->priv->view_border_width = 1;
|
||||
|
||||
chooser->priv->layer_view = NULL;
|
||||
chooser->priv->channel_view = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_constructed (GObject *object)
|
||||
{
|
||||
PikaPickableChooser *chooser = PIKA_PICKABLE_CHOOSER (object);
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *notebook;
|
||||
PikaImage *image;
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
pika_assert (PIKA_IS_CONTEXT (chooser->priv->context));
|
||||
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (chooser), GTK_SHADOW_OUT);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
|
||||
gtk_container_add (GTK_CONTAINER (chooser), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
label = gtk_label_new (_("Images"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
chooser->priv->image_view =
|
||||
pika_container_tree_view_new (chooser->priv->context->pika->images,
|
||||
chooser->priv->context,
|
||||
chooser->priv->view_size,
|
||||
chooser->priv->view_border_width);
|
||||
pika_container_box_set_size_request (PIKA_CONTAINER_BOX (chooser->priv->image_view),
|
||||
4 * (chooser->priv->view_size +
|
||||
2 * chooser->priv->view_border_width),
|
||||
4 * (chooser->priv->view_size +
|
||||
2 * chooser->priv->view_border_width));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), chooser->priv->image_view, TRUE, TRUE, 0);
|
||||
gtk_widget_show (chooser->priv->image_view);
|
||||
|
||||
g_signal_connect_object (chooser->priv->image_view, "activate-item",
|
||||
G_CALLBACK (pika_pickable_chooser_item_activate),
|
||||
G_OBJECT (chooser), 0);
|
||||
g_signal_connect_object (chooser->priv->image_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
chooser->priv->layer_label = label =
|
||||
gtk_label_new (_("Select an image in the left pane"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
|
||||
gtk_widget_show (notebook);
|
||||
|
||||
if (g_type_is_a (PIKA_TYPE_LAYER, chooser->priv->pickable_type))
|
||||
{
|
||||
chooser->priv->layer_view =
|
||||
pika_container_tree_view_new (NULL,
|
||||
chooser->priv->context,
|
||||
chooser->priv->view_size,
|
||||
chooser->priv->view_border_width);
|
||||
gtk_tree_view_set_show_expanders (GTK_TREE_VIEW (PIKA_CONTAINER_TREE_VIEW (chooser->priv->layer_view)->view),
|
||||
TRUE);
|
||||
pika_container_box_set_size_request (PIKA_CONTAINER_BOX (chooser->priv->layer_view),
|
||||
4 * (chooser->priv->view_size +
|
||||
2 * chooser->priv->view_border_width),
|
||||
4 * (chooser->priv->view_size +
|
||||
2 * chooser->priv->view_border_width));
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
chooser->priv->layer_view,
|
||||
gtk_label_new (_("Layers")));
|
||||
gtk_widget_show (chooser->priv->layer_view);
|
||||
|
||||
g_signal_connect_object (chooser->priv->layer_view, "activate-item",
|
||||
G_CALLBACK (pika_pickable_chooser_item_activate),
|
||||
G_OBJECT (chooser), 0);
|
||||
g_signal_connect_object (chooser->priv->layer_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
}
|
||||
|
||||
if (g_type_is_a (PIKA_TYPE_CHANNEL, chooser->priv->pickable_type))
|
||||
{
|
||||
chooser->priv->channel_view =
|
||||
pika_container_tree_view_new (NULL,
|
||||
chooser->priv->context,
|
||||
chooser->priv->view_size,
|
||||
chooser->priv->view_border_width);
|
||||
pika_container_box_set_size_request (PIKA_CONTAINER_BOX (chooser->priv->channel_view),
|
||||
4 * (chooser->priv->view_size +
|
||||
2 * chooser->priv->view_border_width),
|
||||
4 * (chooser->priv->view_size +
|
||||
2 * chooser->priv->view_border_width));
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
chooser->priv->channel_view,
|
||||
gtk_label_new (_("Channels")));
|
||||
gtk_widget_show (chooser->priv->channel_view);
|
||||
|
||||
g_signal_connect_object (chooser->priv->channel_view, "activate-item",
|
||||
G_CALLBACK (pika_pickable_chooser_item_activate),
|
||||
G_OBJECT (chooser), 0);
|
||||
g_signal_connect_object (chooser->priv->channel_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
}
|
||||
|
||||
g_signal_connect_object (chooser->priv->context, "image-changed",
|
||||
G_CALLBACK (pika_pickable_chooser_image_changed),
|
||||
G_OBJECT (chooser), 0);
|
||||
|
||||
image = pika_context_get_image (chooser->priv->context);
|
||||
pika_pickable_chooser_image_changed (chooser->priv->context, image, chooser);
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_finalize (GObject *object)
|
||||
{
|
||||
PikaPickableChooser *chooser = PIKA_PICKABLE_CHOOSER (object);
|
||||
|
||||
g_clear_object (&chooser->priv->pickable);
|
||||
g_clear_object (&chooser->priv->context);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PikaPickableChooser *chooser = PIKA_PICKABLE_CHOOSER (object);
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_CONTEXT:
|
||||
if (chooser->priv->context)
|
||||
g_object_unref (chooser->priv->context);
|
||||
chooser->priv->context = g_value_dup_object (value);
|
||||
break;
|
||||
|
||||
case PROP_VIEW_SIZE:
|
||||
chooser->priv->view_size = g_value_get_int (value);
|
||||
break;
|
||||
|
||||
case PROP_VIEW_BORDER_WIDTH:
|
||||
chooser->priv->view_border_width = g_value_get_int (value);
|
||||
break;
|
||||
|
||||
case PROP_PICKABLE_TYPE:
|
||||
g_return_if_fail (g_value_get_gtype (value) == PIKA_TYPE_LAYER ||
|
||||
g_value_get_gtype (value) == PIKA_TYPE_CHANNEL ||
|
||||
g_value_get_gtype (value) == PIKA_TYPE_DRAWABLE ||
|
||||
g_value_get_gtype (value) == PIKA_TYPE_IMAGE ||
|
||||
g_value_get_gtype (value) == PIKA_TYPE_PICKABLE);
|
||||
chooser->priv->pickable_type = g_value_get_gtype (value);
|
||||
break;
|
||||
|
||||
case PROP_PICKABLE:
|
||||
g_return_if_fail (g_value_get_object (value) == NULL ||
|
||||
g_type_is_a (G_TYPE_FROM_INSTANCE (g_value_get_object (value)),
|
||||
chooser->priv->pickable_type));
|
||||
pika_pickable_chooser_set_pickable (chooser, g_value_get_object (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PikaPickableChooser *chooser = PIKA_PICKABLE_CHOOSER (object);
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_CONTEXT:
|
||||
g_value_set_object (value, chooser->priv->context);
|
||||
break;
|
||||
|
||||
case PROP_PICKABLE_TYPE:
|
||||
g_value_set_gtype (value, chooser->priv->pickable_type);
|
||||
break;
|
||||
|
||||
case PROP_PICKABLE:
|
||||
g_value_set_object (value, chooser->priv->pickable);
|
||||
break;
|
||||
|
||||
case PROP_VIEW_SIZE:
|
||||
g_value_set_int (value, chooser->priv->view_size);
|
||||
break;
|
||||
|
||||
case PROP_VIEW_BORDER_WIDTH:
|
||||
g_value_set_int (value, chooser->priv->view_border_width);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
pika_pickable_chooser_new (PikaContext *context,
|
||||
GType pickable_type,
|
||||
gint view_size,
|
||||
gint view_border_width)
|
||||
{
|
||||
g_return_val_if_fail (PIKA_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= PIKA_VIEWABLE_MAX_POPUP_SIZE, NULL);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= PIKA_VIEW_MAX_BORDER_WIDTH,
|
||||
NULL);
|
||||
|
||||
return g_object_new (PIKA_TYPE_PICKABLE_CHOOSER,
|
||||
"context", context,
|
||||
"pickable-type", pickable_type,
|
||||
"view-size", view_size,
|
||||
"view-border-width", view_border_width,
|
||||
NULL);
|
||||
}
|
||||
|
||||
PikaPickable *
|
||||
pika_pickable_chooser_get_pickable (PikaPickableChooser *chooser)
|
||||
{
|
||||
g_return_val_if_fail (PIKA_IS_PICKABLE_CHOOSER (chooser), NULL);
|
||||
|
||||
return chooser->priv->pickable;
|
||||
}
|
||||
|
||||
void
|
||||
pika_pickable_chooser_set_pickable (PikaPickableChooser *chooser,
|
||||
PikaPickable *pickable)
|
||||
{
|
||||
if (! gtk_widget_in_destruction (GTK_WIDGET (chooser)))
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (chooser->priv->image_view,
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
chooser);
|
||||
if (chooser->priv->layer_view != NULL)
|
||||
g_signal_handlers_disconnect_by_func (chooser->priv->layer_view,
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
chooser);
|
||||
else
|
||||
g_return_if_fail (! PIKA_IS_LAYER (pickable));
|
||||
|
||||
if (chooser->priv->channel_view != NULL)
|
||||
g_signal_handlers_disconnect_by_func (chooser->priv->channel_view,
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
chooser);
|
||||
else
|
||||
g_return_if_fail (! PIKA_IS_CHANNEL (pickable));
|
||||
|
||||
if (PIKA_IS_IMAGE (pickable))
|
||||
{
|
||||
pika_container_view_select_item (PIKA_CONTAINER_VIEW (chooser->priv->image_view),
|
||||
PIKA_VIEWABLE (pickable));
|
||||
pika_context_set_image (chooser->priv->context, PIKA_IMAGE (pickable));
|
||||
}
|
||||
else if (PIKA_IS_LAYER (pickable))
|
||||
{
|
||||
pika_context_set_image (chooser->priv->context, pika_item_get_image (PIKA_ITEM (pickable)));
|
||||
pika_container_view_select_item (PIKA_CONTAINER_VIEW (chooser->priv->layer_view),
|
||||
PIKA_VIEWABLE (pickable));
|
||||
}
|
||||
else if (PIKA_IS_CHANNEL (pickable))
|
||||
{
|
||||
pika_context_set_image (chooser->priv->context, pika_item_get_image (PIKA_ITEM (pickable)));
|
||||
pika_container_view_select_item (PIKA_CONTAINER_VIEW (chooser->priv->channel_view),
|
||||
PIKA_VIEWABLE (pickable));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_return_if_fail (pickable == NULL);
|
||||
pika_container_view_select_item (PIKA_CONTAINER_VIEW (chooser->priv->image_view), NULL);
|
||||
pika_context_set_image (chooser->priv->context, NULL);
|
||||
}
|
||||
g_signal_connect_object (chooser->priv->image_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
if (chooser->priv->layer_view != NULL)
|
||||
g_signal_connect_object (chooser->priv->layer_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
if (chooser->priv->channel_view != NULL)
|
||||
g_signal_connect_object (chooser->priv->channel_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
}
|
||||
|
||||
if (pickable != chooser->priv->pickable)
|
||||
{
|
||||
g_clear_object (&chooser->priv->pickable);
|
||||
chooser->priv->pickable = (pickable != NULL ? g_object_ref (pickable) : NULL);
|
||||
g_object_notify (G_OBJECT (chooser), "pickable");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_image_changed (PikaContext *context,
|
||||
PikaImage *image,
|
||||
PikaPickableChooser *chooser)
|
||||
{
|
||||
PikaContainer *layers = NULL;
|
||||
PikaContainer *channels = NULL;
|
||||
|
||||
if (image)
|
||||
{
|
||||
gchar *desc;
|
||||
|
||||
layers = pika_image_get_layers (image);
|
||||
channels = pika_image_get_channels (image);
|
||||
|
||||
desc = pika_viewable_get_description (PIKA_VIEWABLE (image), NULL);
|
||||
gtk_label_set_text (GTK_LABEL (chooser->priv->layer_label), desc);
|
||||
g_free (desc);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_label_set_text (GTK_LABEL (chooser->priv->layer_label),
|
||||
_("Select an image in the left pane"));
|
||||
}
|
||||
|
||||
g_signal_handlers_disconnect_by_func (chooser->priv->image_view,
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
chooser);
|
||||
if (chooser->priv->layer_view != NULL)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (chooser->priv->layer_view,
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
chooser);
|
||||
pika_container_view_set_container (PIKA_CONTAINER_VIEW (chooser->priv->layer_view),
|
||||
layers);
|
||||
g_signal_connect_object (chooser->priv->layer_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
}
|
||||
if (chooser->priv->channel_view != NULL)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (chooser->priv->channel_view,
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
chooser);
|
||||
pika_container_view_set_container (PIKA_CONTAINER_VIEW (chooser->priv->channel_view),
|
||||
channels);
|
||||
g_signal_connect_object (chooser->priv->channel_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
}
|
||||
g_signal_connect_object (chooser->priv->image_view, "select-items",
|
||||
G_CALLBACK (pika_pickable_chooser_items_selected),
|
||||
G_OBJECT (chooser), 0);
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_item_activate (PikaContainerView *view,
|
||||
PikaPickable *pickable,
|
||||
gpointer unused,
|
||||
PikaPickableChooser *chooser)
|
||||
{
|
||||
g_signal_emit (chooser, signals[ACTIVATE], 0, pickable);
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_chooser_items_selected (PikaContainerView *view,
|
||||
GList *items,
|
||||
GList *paths,
|
||||
PikaPickableChooser *chooser)
|
||||
{
|
||||
PikaPickable *pickable = NULL;
|
||||
|
||||
g_return_if_fail (g_list_length (items) <= 1);
|
||||
|
||||
if (items != NULL)
|
||||
pickable = items->data;
|
||||
|
||||
pika_pickable_chooser_set_pickable (chooser, pickable);
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/* PIKA - Photo and Image Kooker Application
|
||||
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||
*
|
||||
* Original copyright, applying to most contents (license remains unchanged):
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* pikapickablechooser.h
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __PIKA_PICKABLE_CHOOSER_H__
|
||||
#define __PIKA_PICKABLE_CHOOSER_H__
|
||||
|
||||
|
||||
#define PIKA_TYPE_PICKABLE_CHOOSER (pika_pickable_chooser_get_type ())
|
||||
#define PIKA_PICKABLE_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_PICKABLE_CHOOSER, PikaPickableChooser))
|
||||
#define PIKA_PICKABLE_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_PICKABLE_CHOOSER, PikaPickableChooserClass))
|
||||
#define PIKA_IS_PICKABLE_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_PICKABLE_CHOOSER))
|
||||
#define PIKA_IS_PICKABLE_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_PICKABLE_CHOOSER))
|
||||
#define PIKA_PICKABLE_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_PICKABLE_CHOOSER, PikaPickableChooserClass))
|
||||
|
||||
|
||||
typedef struct _PikaPickableChooserPrivate PikaPickableChooserPrivate;
|
||||
typedef struct _PikaPickableChooserClass PikaPickableChooserClass;
|
||||
|
||||
struct _PikaPickableChooser
|
||||
{
|
||||
GtkFrame parent_instance;
|
||||
|
||||
PikaPickableChooserPrivate *priv;
|
||||
};
|
||||
|
||||
struct _PikaPickableChooserClass
|
||||
{
|
||||
GtkFrameClass parent_instance;
|
||||
|
||||
/* Signals. */
|
||||
|
||||
void (* activate) (PikaPickableChooser *view,
|
||||
PikaPickable *pickable);
|
||||
};
|
||||
|
||||
|
||||
GType pika_pickable_chooser_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * pika_pickable_chooser_new (PikaContext *context,
|
||||
GType pickable_type,
|
||||
gint view_size,
|
||||
gint view_border_width);
|
||||
|
||||
PikaPickable * pika_pickable_chooser_get_pickable (PikaPickableChooser *chooser);
|
||||
void pika_pickable_chooser_set_pickable (PikaPickableChooser *chooser,
|
||||
PikaPickable *pickable);
|
||||
|
||||
|
||||
#endif /* __PIKA_PICKABLE_CHOOSER_H__ */
|
|
@ -0,0 +1,164 @@
|
|||
/* PIKA - Photo and Image Kooker Application
|
||||
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||
*
|
||||
* Original copyright, applying to most contents (license remains unchanged):
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* pikapickableselect.c
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libpikabase/pikabase.h"
|
||||
#include "libpikawidgets/pikawidgets.h"
|
||||
|
||||
#include "widgets-types.h"
|
||||
|
||||
#include "gegl/pika-babl-compat.h"
|
||||
|
||||
#include "core/pika.h"
|
||||
#include "core/pikacontext.h"
|
||||
#include "core/pikadrawable.h"
|
||||
#include "core/pikapickable.h"
|
||||
#include "core/pikaparamspecs.h"
|
||||
#include "core/pikatempbuf.h"
|
||||
|
||||
#include "pdb/pikapdb.h"
|
||||
|
||||
#include "pikapickablechooser.h"
|
||||
#include "pikapickableselect.h"
|
||||
#include "pikacontainerbox.h"
|
||||
|
||||
#include "pika-intl.h"
|
||||
|
||||
|
||||
static void pika_pickable_select_constructed (GObject *object);
|
||||
|
||||
static PikaValueArray * pika_pickable_select_run_callback (PikaPdbDialog *dialog,
|
||||
PikaObject *object,
|
||||
gboolean closing,
|
||||
GError **error);
|
||||
static PikaObject * pika_pickable_select_get_object (PikaPdbDialog *dialog);
|
||||
static void pika_pickable_select_set_object (PikaPdbDialog *dialog,
|
||||
PikaObject *object);
|
||||
|
||||
static void pika_pickable_select_activate (PikaPickableSelect *select);
|
||||
static void pika_pickable_select_notify_pickable (PikaPickableSelect *select);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (PikaPickableSelect, pika_pickable_select, PIKA_TYPE_PDB_DIALOG)
|
||||
|
||||
#define parent_class pika_pickable_select_parent_class
|
||||
|
||||
|
||||
static void
|
||||
pika_pickable_select_class_init (PikaPickableSelectClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
PikaPdbDialogClass *pdb_class = PIKA_PDB_DIALOG_CLASS (klass);
|
||||
|
||||
object_class->constructed = pika_pickable_select_constructed;
|
||||
|
||||
pdb_class->run_callback = pika_pickable_select_run_callback;
|
||||
pdb_class->get_object = pika_pickable_select_get_object;
|
||||
pdb_class->set_object = pika_pickable_select_set_object;
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_select_init (PikaPickableSelect *select)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_select_constructed (GObject *object)
|
||||
{
|
||||
PikaPdbDialog *dialog = PIKA_PDB_DIALOG (object);
|
||||
PikaPickableSelect *select = PIKA_PICKABLE_SELECT (object);
|
||||
GtkWidget *content_area;
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
select->chooser = pika_pickable_chooser_new (dialog->context, dialog->select_type,
|
||||
PIKA_VIEW_SIZE_LARGE, 1);
|
||||
pika_pickable_chooser_set_pickable (PIKA_PICKABLE_CHOOSER (select->chooser),
|
||||
PIKA_PICKABLE (dialog->initial_object));
|
||||
g_signal_connect_swapped (select->chooser, "notify::pickable",
|
||||
G_CALLBACK (pika_pickable_select_notify_pickable),
|
||||
select);
|
||||
g_signal_connect_swapped (select->chooser, "activate",
|
||||
G_CALLBACK (pika_pickable_select_activate),
|
||||
select);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), select->chooser, TRUE, TRUE, 0);
|
||||
gtk_widget_show (select->chooser);
|
||||
}
|
||||
|
||||
static PikaValueArray *
|
||||
pika_pickable_select_run_callback (PikaPdbDialog *dialog,
|
||||
PikaObject *object,
|
||||
gboolean closing,
|
||||
GError **error)
|
||||
{
|
||||
PikaPickable *pickable = PIKA_PICKABLE (object);
|
||||
PikaValueArray *return_vals;
|
||||
|
||||
return_vals =
|
||||
pika_pdb_execute_procedure_by_name (dialog->pdb,
|
||||
dialog->caller_context,
|
||||
NULL, error,
|
||||
dialog->callback_name,
|
||||
PIKA_TYPE_DRAWABLE, pickable,
|
||||
G_TYPE_BOOLEAN, closing,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static PikaObject *
|
||||
pika_pickable_select_get_object (PikaPdbDialog *dialog)
|
||||
{
|
||||
PikaPickableSelect *select = PIKA_PICKABLE_SELECT (dialog);
|
||||
|
||||
return (PikaObject *) pika_pickable_chooser_get_pickable (PIKA_PICKABLE_CHOOSER (select->chooser));
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_select_set_object (PikaPdbDialog *dialog,
|
||||
PikaObject *object)
|
||||
{
|
||||
PikaPickableSelect *select = PIKA_PICKABLE_SELECT (dialog);
|
||||
|
||||
pika_pickable_chooser_set_pickable (PIKA_PICKABLE_CHOOSER (select->chooser), PIKA_PICKABLE (object));
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_select_activate (PikaPickableSelect *select)
|
||||
{
|
||||
pika_pdb_dialog_run_callback ((PikaPdbDialog **) &select, TRUE);
|
||||
gtk_widget_destroy (GTK_WIDGET (select));
|
||||
}
|
||||
|
||||
static void
|
||||
pika_pickable_select_notify_pickable (PikaPickableSelect *select)
|
||||
{
|
||||
pika_pdb_dialog_run_callback ((PikaPdbDialog **) &select, FALSE);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
/* PIKA - Photo and Image Kooker Application
|
||||
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||
*
|
||||
* Original copyright, applying to most contents (license remains unchanged):
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* pikapickableselect.h
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __PIKA_PICKABLE_SELECT_H__
|
||||
#define __PIKA_PICKABLE_SELECT_H__
|
||||
|
||||
#include "pikapdbdialog.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define PIKA_TYPE_PICKABLE_SELECT (pika_pickable_select_get_type ())
|
||||
#define PIKA_PICKABLE_SELECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_PICKABLE_SELECT, PikaPickableSelect))
|
||||
#define PIKA_PICKABLE_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_PICKABLE_SELECT, PikaPickableSelectClass))
|
||||
#define PIKA_IS_PICKABLE_SELECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_PICKABLE_SELECT))
|
||||
#define PIKA_IS_PICKABLE_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_PICKABLE_SELECT))
|
||||
#define PIKA_PICKABLE_SELECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_PICKABLE_SELECT, PikaPickableSelectClass))
|
||||
|
||||
|
||||
typedef struct _PikaPickableSelectClass PikaPickableSelectClass;
|
||||
|
||||
struct _PikaPickableSelect
|
||||
{
|
||||
PikaPdbDialog parent_instance;
|
||||
|
||||
GtkWidget *chooser;
|
||||
};
|
||||
|
||||
struct _PikaPickableSelectClass
|
||||
{
|
||||
PikaPdbDialogClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType pika_pickable_select_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PIKA_PICKABLE_SELECT_H__ */
|
|
@ -0,0 +1,24 @@
|
|||
diff -urN pika-2.10.30-orig/build/windows/pika-plug-ins.rc.in pika-2.10.30/build/windows/pika-plug-ins.rc.in
|
||||
--- pika-2.10.30-orig/build/windows/pika-plug-ins.rc.in 2021-12-20 04:48:33.000000000 +0800
|
||||
+++ pika-2.10.30/build/windows/pika-plug-ins.rc.in 2022-01-05 20:54:00.814712400 +0800
|
||||
@@ -63,5 +63,5 @@
|
||||
END
|
||||
|
||||
#include "winuser.h"
|
||||
-1 ICON QUOTE(TOP_SRCDIR) "/build/windows/plug-ins.ico"
|
||||
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST QUOTE(TOP_SRCDIR) "/build/windows/pika.manifest"
|
||||
+1 ICON "./build/windows/plug-ins.ico"
|
||||
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "./build/windows/pika.manifest"
|
||||
diff -urN pika-2.10.30-orig/build/windows/pika.rc.in pika-2.10.30/build/windows/pika.rc.in
|
||||
--- pika-2.10.30-orig/build/windows/pika.rc.in 2021-12-20 04:48:33.000000000 +0800
|
||||
+++ pika-2.10.30/build/windows/pika.rc.in 2022-01-05 20:52:37.741960900 +0800
|
||||
@@ -64,6 +64,6 @@
|
||||
END
|
||||
|
||||
#include "winuser.h"
|
||||
-1 ICON QUOTE(TOP_SRCDIR) "/build/windows/wilber.ico"
|
||||
-2 ICON QUOTE(TOP_SRCDIR) "/build/windows/fileicon.ico"
|
||||
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST QUOTE(TOP_SRCDIR) "/build/windows/pika.manifest"
|
||||
+1 ICON "./build/windows/wilber.ico"
|
||||
+2 ICON "./build/windows/fileicon.ico"
|
||||
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "./build/windows/pika.manifest"
|
|
@ -0,0 +1,600 @@
|
|||
diff -bur pika-2.99.12-c/app/meson.build pika-2.99.12/app/meson.build
|
||||
--- pika-2.99.12-c/app/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/app/meson.build 2022-08-26 11:05:18.272156800 -0600
|
||||
@@ -151,9 +151,9 @@
|
||||
console_rc_file = windows.compile_resources(
|
||||
pika_app_console_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(console_rc_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(console_rc_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(console_rc_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(console_rc_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
@@ -169,9 +169,9 @@
|
||||
gui_rc_file = windows.compile_resources(
|
||||
pika_app_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(gui_rc_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(gui_rc_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(gui_rc_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(gui_rc_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/extensions/goat-exercises/meson.build pika-2.99.12/extensions/goat-exercises/meson.build
|
||||
--- pika-2.99.12-c/extensions/goat-exercises/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/extensions/goat-exercises/meson.build 2022-08-26 11:05:21.367326100 -0600
|
||||
@@ -11,9 +11,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plug_in_name + '-c.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plug_in_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plug_in_name + '-c.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plug_in_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/common/meson.build pika-2.99.12/plug-ins/common/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/common/meson.build 2022-08-26 10:58:35.055807300 -0600
|
||||
+++ pika-2.99.12/plug-ins/common/meson.build 2022-08-26 11:05:18.323293100 -0600
|
||||
@@ -178,9 +178,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
plugin_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-bmp/meson.build pika-2.99.12/plug-ins/file-bmp/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-bmp/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-bmp/meson.build 2022-08-26 11:05:18.326295200 -0600
|
||||
@@ -10,9 +10,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-dds/meson.build pika-2.99.12/plug-ins/file-dds/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-dds/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-dds/meson.build 2022-08-26 11:05:18.328294700 -0600
|
||||
@@ -14,9 +14,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-exr/meson.build pika-2.99.12/plug-ins/file-exr/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-exr/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-exr/meson.build 2022-08-26 11:05:18.330294400 -0600
|
||||
@@ -11,9 +11,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-faxg3/meson.build pika-2.99.12/plug-ins/file-faxg3/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-faxg3/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-faxg3/meson.build 2022-08-26 11:05:18.332294000 -0600
|
||||
@@ -9,9 +9,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
--- pika-2.99.16/plug-ins/file-fits/meson.build.orig 2023-07-06 07:48:46.078752900 +0200
|
||||
+++ pika-2.99.16/plug-ins/file-fits/meson.build 2023-07-06 07:49:41.120861200 +0200
|
||||
@@ -9,9 +9,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-fli/meson.build pika-2.99.12/plug-ins/file-fli/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-fli/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-fli/meson.build 2022-08-26 11:05:18.336295400 -0600
|
||||
@@ -9,9 +9,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-ico/meson.build pika-2.99.12/plug-ins/file-ico/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-ico/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-ico/meson.build 2022-08-26 11:05:18.338293600 -0600
|
||||
@@ -11,9 +11,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-jpeg/meson.build pika-2.99.12/plug-ins/file-jpeg/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-jpeg/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-jpeg/meson.build 2022-08-26 11:05:18.340292800 -0600
|
||||
@@ -13,9 +13,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-psd/meson.build pika-2.99.12/plug-ins/file-psd/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-psd/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-psd/meson.build 2022-08-26 11:05:18.342293000 -0600
|
||||
@@ -14,9 +14,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-raw/meson.build pika-2.99.12/plug-ins/file-raw/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-raw/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-raw/meson.build 2022-08-26 11:05:18.344293200 -0600
|
||||
@@ -21,9 +21,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
plugin_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-sgi/meson.build pika-2.99.12/plug-ins/file-sgi/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-sgi/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-sgi/meson.build 2022-08-26 11:05:18.346292800 -0600
|
||||
@@ -9,9 +9,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-tiff/meson.build pika-2.99.12/plug-ins/file-tiff/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-tiff/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-tiff/meson.build 2022-08-26 11:05:18.348293500 -0600
|
||||
@@ -11,9 +11,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/file-webp/meson.build pika-2.99.12/plug-ins/file-webp/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/file-webp/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/file-webp/meson.build 2022-08-26 11:05:18.350294300 -0600
|
||||
@@ -13,9 +13,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/flame/meson.build pika-2.99.12/plug-ins/flame/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/flame/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/flame/meson.build 2022-08-26 11:05:18.353294700 -0600
|
||||
@@ -11,9 +11,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/fractal-explorer/meson.build pika-2.99.12/plug-ins/fractal-explorer/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/fractal-explorer/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/fractal-explorer/meson.build 2022-08-26 11:05:18.355294200 -0600
|
||||
@@ -11,9 +11,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/gfig/meson.build pika-2.99.12/plug-ins/gfig/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/gfig/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/gfig/meson.build 2022-08-26 11:05:18.358466600 -0600
|
||||
@@ -27,9 +27,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/pikaressionist/meson.build pika-2.99.12/plug-ins/pikaressionist/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/pikaressionist/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/pikaressionist/meson.build 2022-08-26 11:05:18.361592500 -0600
|
||||
@@ -29,9 +29,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/gradient-flare/meson.build pika-2.99.12/plug-ins/gradient-flare/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/gradient-flare/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/gradient-flare/meson.build 2022-08-26 11:05:18.365447800 -0600
|
||||
@@ -10,9 +10,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/help/meson.build pika-2.99.12/plug-ins/help/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/help/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/help/meson.build 2022-08-26 11:05:18.367447200 -0600
|
||||
@@ -13,9 +13,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/help-browser/meson.build pika-2.99.12/plug-ins/help-browser/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/help-browser/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/help-browser/meson.build 2022-08-26 11:05:18.369447300 -0600
|
||||
@@ -12,9 +12,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||
args: [
|
||||
- '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
||||
- '--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
||||
- '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
||||
+ '--define', 'ORIGINALFILENAME_STR=@0@'.format(plugin_name+'.exe'),
|
||||
+ '--define', 'INTERNALNAME_STR=@0@' .format(plugin_name),
|
||||
+ '--define', 'TOP_SRCDIR=@0@' .format(meson.project_source_root()),
|
||||
],
|
||||
include_directories: [
|
||||
rootInclude, appInclude,
|
||||
diff -bur pika-2.99.12-c/plug-ins/ifs-compose/meson.build pika-2.99.12/plug-ins/ifs-compose/meson.build
|
||||
--- pika-2.99.12-c/plug-ins/ifs-compose/meson.build 2022-08-21 13:21:38.000000000 -0600
|
||||
+++ pika-2.99.12/plug-ins/ifs-compose/meson.build 2022-08-26 11:05:18.371447900 -0600
|
||||
@@ -10,9 +10,9 @@
|
||||
plugin_sources += windows.compile_resources(
|
||||
pika_plugins_rc,
|
||||