New upstream version 2.10.18
This commit is contained in:
@ -90,14 +90,8 @@ build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = app/dialogs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4macros/gtk-doc.m4 \
|
||||
$(top_srcdir)/m4macros/intltool.m4 \
|
||||
$(top_srcdir)/m4macros/libtool.m4 \
|
||||
$(top_srcdir)/m4macros/ltoptions.m4 \
|
||||
$(top_srcdir)/m4macros/ltsugar.m4 \
|
||||
$(top_srcdir)/m4macros/ltversion.m4 \
|
||||
$(top_srcdir)/m4macros/lt~obsolete.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/m4macros/alsa.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/m4macros/alsa.m4 \
|
||||
$(top_srcdir)/m4macros/ax_compare_version.m4 \
|
||||
$(top_srcdir)/m4macros/ax_cxx_compile_stdcxx.m4 \
|
||||
$(top_srcdir)/m4macros/ax_gcc_func_attribute.m4 \
|
||||
@ -359,6 +353,7 @@ GIMP_MICRO_VERSION = @GIMP_MICRO_VERSION@
|
||||
GIMP_MINOR_VERSION = @GIMP_MINOR_VERSION@
|
||||
GIMP_MKENUMS = @GIMP_MKENUMS@
|
||||
GIMP_MODULES = @GIMP_MODULES@
|
||||
GIMP_PACKAGE_REVISION = @GIMP_PACKAGE_REVISION@
|
||||
GIMP_PKGCONFIG_VERSION = @GIMP_PKGCONFIG_VERSION@
|
||||
GIMP_PLUGINS = @GIMP_PLUGINS@
|
||||
GIMP_PLUGIN_VERSION = @GIMP_PLUGIN_VERSION@
|
||||
@ -432,6 +427,8 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
ISO_CODES_LOCALEDIR = @ISO_CODES_LOCALEDIR@
|
||||
ISO_CODES_LOCATION = @ISO_CODES_LOCATION@
|
||||
JPEG_LIBS = @JPEG_LIBS@
|
||||
JSON_GLIB_CFLAGS = @JSON_GLIB_CFLAGS@
|
||||
JSON_GLIB_LIBS = @JSON_GLIB_LIBS@
|
||||
LCMS_CFLAGS = @LCMS_CFLAGS@
|
||||
LCMS_LIBS = @LCMS_LIBS@
|
||||
LCMS_REQUIRED_VERSION = @LCMS_REQUIRED_VERSION@
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
#include "dialogs-types.h"
|
||||
|
||||
#include "config/gimpcoreconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
@ -38,6 +40,7 @@
|
||||
|
||||
#include "about-dialog.h"
|
||||
#include "authors.h"
|
||||
#include "gimp-update.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
@ -53,6 +56,8 @@ typedef struct
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
GtkWidget *update_frame;
|
||||
|
||||
GtkWidget *anim_area;
|
||||
PangoLayout *layout;
|
||||
|
||||
@ -79,6 +84,8 @@ static void about_dialog_add_animation (GtkWidget *vbox,
|
||||
static gboolean about_dialog_anim_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
GimpAboutDialog *dialog);
|
||||
static void about_dialog_add_update (GimpAboutDialog *dialog,
|
||||
GimpCoreConfig *config);
|
||||
static void about_dialog_reshuffle (GimpAboutDialog *dialog);
|
||||
static gboolean about_dialog_timer (gpointer data);
|
||||
|
||||
@ -87,13 +94,17 @@ static void about_dialog_add_unstable_message
|
||||
(GtkWidget *vbox);
|
||||
#endif /* GIMP_UNSTABLE */
|
||||
|
||||
static void about_dialog_last_release_changed
|
||||
(GimpCoreConfig *config,
|
||||
const GParamSpec *pspec,
|
||||
GimpAboutDialog *dialog);
|
||||
|
||||
GtkWidget *
|
||||
about_dialog_create (GimpContext *context)
|
||||
about_dialog_create (GimpCoreConfig *config)
|
||||
{
|
||||
static GimpAboutDialog dialog;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CORE_CONFIG (config), NULL);
|
||||
|
||||
if (! dialog.dialog)
|
||||
{
|
||||
@ -160,6 +171,7 @@ about_dialog_create (GimpContext *context)
|
||||
#ifdef GIMP_UNSTABLE
|
||||
about_dialog_add_unstable_message (children->data);
|
||||
#endif /* GIMP_UNSTABLE */
|
||||
about_dialog_add_update (&dialog, config);
|
||||
}
|
||||
else
|
||||
g_warning ("%s: ooops, no box in this container?", G_STRLOC);
|
||||
@ -235,7 +247,7 @@ about_dialog_add_animation (GtkWidget *vbox,
|
||||
|
||||
dialog->anim_area = gtk_drawing_area_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), dialog->anim_area, FALSE, FALSE, 0);
|
||||
gtk_box_reorder_child (GTK_BOX (vbox), dialog->anim_area, 4);
|
||||
gtk_box_reorder_child (GTK_BOX (vbox), dialog->anim_area, 5);
|
||||
gtk_widget_show (dialog->anim_area);
|
||||
|
||||
dialog->layout = gtk_widget_create_pango_layout (dialog->anim_area, NULL);
|
||||
@ -251,6 +263,141 @@ about_dialog_add_animation (GtkWidget *vbox,
|
||||
dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
about_dialog_add_update (GimpAboutDialog *dialog,
|
||||
GimpCoreConfig *config)
|
||||
{
|
||||
GtkWidget *container;
|
||||
GList *children;
|
||||
GtkWidget *vbox;
|
||||
|
||||
GtkWidget *frame;
|
||||
GtkWidget *box;
|
||||
GtkWidget *label;
|
||||
GtkWidget *button;
|
||||
GDateTime *datetime;
|
||||
gchar *date;
|
||||
gchar *text;
|
||||
|
||||
/* Get the dialog vbox. */
|
||||
container = gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog));
|
||||
children = gtk_container_get_children (GTK_CONTAINER (container));
|
||||
g_return_if_fail (GTK_IS_BOX (children->data));
|
||||
vbox = children->data;
|
||||
g_list_free (children);
|
||||
|
||||
/* The preferred localized date representation without the time. */
|
||||
datetime = g_date_time_new_from_unix_local (config->last_release_timestamp);
|
||||
date = g_date_time_format (datetime, "%x");
|
||||
g_date_time_unref (datetime);
|
||||
|
||||
/* The update frame. */
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
if (config->last_known_release != NULL)
|
||||
{
|
||||
/* There is a newer version. */
|
||||
GtkWidget *link;
|
||||
GtkWidget *box2;
|
||||
GtkWidget *image;
|
||||
|
||||
/* We want the frame to stand out. */
|
||||
label = gtk_label_new (NULL);
|
||||
text = g_strdup_printf ("<tt><b><big>%s</big></b></tt>",
|
||||
_("New version available!"));
|
||||
gtk_label_set_markup (GTK_LABEL (label), text);
|
||||
g_free (text);
|
||||
gtk_widget_show (label);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), label);
|
||||
gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT);
|
||||
gtk_box_reorder_child (GTK_BOX (vbox), frame, 3);
|
||||
|
||||
/* Explanation text with update image. */
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), box2, FALSE, FALSE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("software-update-available",
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
gtk_box_pack_start (GTK_BOX (box2), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
|
||||
if (config->last_revision > 0)
|
||||
{
|
||||
/* This is actually a new revision of current version. */
|
||||
text = g_strdup_printf (_("A revision of GIMP %s was released on %s.\n"
|
||||
"Even though you use the last version, it is recommended to reinstall.\n"
|
||||
"New revisions come with package fixes."),
|
||||
config->last_known_release, date);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = g_strdup_printf (_("A new version of GIMP (%s) was released on %s.\n"
|
||||
"It is recommended to update."),
|
||||
config->last_known_release, date);
|
||||
}
|
||||
label = gtk_label_new (text);
|
||||
g_free (text);
|
||||
g_free (date);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
/* Finally the download link. */
|
||||
link = gtk_link_button_new_with_label ("https://www.gimp.org/downloads/",
|
||||
_("Go to download page"));
|
||||
gtk_box_pack_start (GTK_BOX (box), link, FALSE, FALSE, 0);
|
||||
gtk_widget_show (link);
|
||||
}
|
||||
|
||||
/* Show a check update button. */
|
||||
gtk_box_reorder_child (GTK_BOX (vbox), frame, 4);
|
||||
|
||||
if (config->check_update_timestamp > 0)
|
||||
{
|
||||
gchar *subtext;
|
||||
|
||||
datetime = g_date_time_new_from_unix_local (config->check_update_timestamp);
|
||||
date = g_date_time_format (datetime, "%x");
|
||||
subtext = g_strdup_printf (_("Last checked on %s"), date);
|
||||
g_date_time_unref (datetime);
|
||||
g_free (date);
|
||||
|
||||
text = g_strdup_printf ("%s\n<i>%s</i>",
|
||||
_("Check for updates"), subtext);
|
||||
g_free (subtext);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = g_strdup_printf ("%s", _("Check for updates"));
|
||||
}
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), text);
|
||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
|
||||
g_free (text);
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (button), label);
|
||||
gtk_widget_show (label);
|
||||
|
||||
g_signal_connect (config, "notify::last-known-release",
|
||||
(GCallback) about_dialog_last_release_changed,
|
||||
dialog);
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
(GCallback) gimp_update_check, config);
|
||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_widget_show (box);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
dialog->update_frame = frame;
|
||||
}
|
||||
|
||||
static void
|
||||
about_dialog_reshuffle (GimpAboutDialog *dialog)
|
||||
{
|
||||
@ -618,3 +765,23 @@ about_dialog_add_unstable_message (GtkWidget *vbox)
|
||||
}
|
||||
|
||||
#endif /* GIMP_UNSTABLE */
|
||||
|
||||
static void
|
||||
about_dialog_last_release_changed (GimpCoreConfig *config,
|
||||
const GParamSpec *pspec,
|
||||
GimpAboutDialog *dialog)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (config,
|
||||
(GCallback) about_dialog_last_release_changed,
|
||||
dialog);
|
||||
if (! dialog->dialog)
|
||||
return;
|
||||
|
||||
if (dialog->update_frame)
|
||||
{
|
||||
gtk_widget_destroy (dialog->update_frame);
|
||||
dialog->update_frame = NULL;
|
||||
}
|
||||
|
||||
about_dialog_add_update (dialog, config);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define __ABOUT_DIALOG_H__
|
||||
|
||||
|
||||
GtkWidget * about_dialog_create (GimpContext *context);
|
||||
GtkWidget * about_dialog_create (GimpCoreConfig *config);
|
||||
|
||||
|
||||
#endif /* __ABOUT_DIALOG_H__ */
|
||||
|
@ -195,7 +195,7 @@ dialogs_about_get (GimpDialogFactory *factory,
|
||||
GimpUIManager *ui_manager,
|
||||
gint view_size)
|
||||
{
|
||||
return about_dialog_create (context);
|
||||
return about_dialog_create (context->gimp->config);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@ -222,7 +222,9 @@ dialogs_critical_get (GimpDialogFactory *factory,
|
||||
GimpUIManager *ui_manager,
|
||||
gint view_size)
|
||||
{
|
||||
return gimp_critical_dialog_new (_("GIMP Debug"));
|
||||
return gimp_critical_dialog_new (_("GIMP Debug"),
|
||||
context->gimp->config->last_known_release,
|
||||
context->gimp->config->last_release_timestamp);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@ -244,6 +244,7 @@ static const GimpDialogFactoryEntry entries[] =
|
||||
FOREIGN ("gimp-shear-tool-dialog", TRUE, FALSE),
|
||||
FOREIGN ("gimp-text-tool-dialog", TRUE, TRUE),
|
||||
FOREIGN ("gimp-threshold-tool-dialog", TRUE, FALSE),
|
||||
FOREIGN ("gimp-transform-3d-tool-dialog", TRUE, FALSE),
|
||||
FOREIGN ("gimp-perspective-tool-dialog", TRUE, FALSE),
|
||||
FOREIGN ("gimp-unified-transform-tool-dialog", TRUE, FALSE),
|
||||
FOREIGN ("gimp-handle-transform-tool-dialog", TRUE, FALSE),
|
||||
|
@ -162,7 +162,10 @@ inv_show_status (void)
|
||||
static gboolean
|
||||
inv_draw (gpointer data)
|
||||
{
|
||||
gtk_widget_queue_draw (data);
|
||||
inv_draw_idle = 0;
|
||||
|
||||
if (geginv)
|
||||
gtk_widget_queue_draw (data);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1109,6 +1109,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
GtkWidget *entry;
|
||||
GtkWidget *calibrate_button;
|
||||
GSList *group;
|
||||
GtkWidget *separator;
|
||||
GtkWidget *editor;
|
||||
gint i;
|
||||
|
||||
@ -1214,6 +1215,16 @@ prefs_dialog_new (Gimp *gimp,
|
||||
"(please report)."));
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Internet access */
|
||||
#ifdef CHECK_UPDATE
|
||||
vbox2 = prefs_frame_new (_("Network access"), GTK_CONTAINER (vbox),
|
||||
FALSE);
|
||||
|
||||
prefs_check_button_add (object, "check-updates",
|
||||
_("Check for updates (requires internet)"),
|
||||
GTK_BOX (vbox2));
|
||||
#endif
|
||||
|
||||
/* Image Thumbnails */
|
||||
vbox2 = prefs_frame_new (_("Image Thumbnails"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
@ -1812,6 +1823,13 @@ prefs_dialog_new (Gimp *gimp,
|
||||
prefs_language_combo_box_add (object, "language", GTK_BOX (vbox2));
|
||||
#endif
|
||||
|
||||
/* Style */
|
||||
vbox2 = prefs_frame_new (_("Style"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
button = prefs_check_button_add (object, "compact-sliders",
|
||||
_("Use co_mpact sliders"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
/* Previews */
|
||||
vbox2 = prefs_frame_new (_("Previews"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
@ -1909,7 +1927,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
GTK_SHADOW_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scrolled_win);
|
||||
@ -2010,7 +2028,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
GTK_SHADOW_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scrolled_win);
|
||||
@ -2138,13 +2156,21 @@ prefs_dialog_new (Gimp *gimp,
|
||||
GIMP_ICON_IMAGE,
|
||||
GTK_BOX (vbox2), size_group);
|
||||
|
||||
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), separator, FALSE, FALSE, 0);
|
||||
gtk_widget_show (separator);
|
||||
|
||||
prefs_check_button_add_with_icon (object, "toolbox-groups",
|
||||
_("Use tool _groups"),
|
||||
NULL,
|
||||
GTK_BOX (vbox2), size_group);
|
||||
|
||||
g_clear_object (&size_group);
|
||||
|
||||
/* Tool Editor */
|
||||
vbox2 = prefs_frame_new (_("Tools Configuration"),
|
||||
GTK_CONTAINER (vbox), TRUE);
|
||||
tool_editor = gimp_tool_editor_new (gimp->tool_info_list, gimp->user_context,
|
||||
gimp_tools_get_default_order (gimp),
|
||||
tool_editor = gimp_tool_editor_new (gimp->tool_item_list, gimp->user_context,
|
||||
GIMP_VIEW_SIZE_SMALL, 1);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), tool_editor, TRUE, TRUE, 0);
|
||||
@ -2865,9 +2891,18 @@ prefs_dialog_new (Gimp *gimp,
|
||||
vbox2 = prefs_frame_new (_("Mouse Pointers"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (object, "show-brush-outline",
|
||||
_("Show _brush outline"),
|
||||
GTK_BOX (vbox2));
|
||||
button = prefs_check_button_add (object, "show-brush-outline",
|
||||
_("Show _brush outline"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
vbox3 = prefs_frame_new (NULL, GTK_CONTAINER (vbox2), FALSE);
|
||||
g_object_bind_property (button, "active",
|
||||
vbox3, "sensitive",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
prefs_check_button_add (object, "snap-brush-outline",
|
||||
_("S_nap brush outline to stroke"),
|
||||
GTK_BOX (vbox3));
|
||||
|
||||
prefs_check_button_add (object, "show-paint-tool-cursor",
|
||||
_("Show pointer for paint _tools"),
|
||||
GTK_BOX (vbox2));
|
||||
@ -2982,7 +3017,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
GTK_SHADOW_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_win, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scrolled_win);
|
||||
|
Reference in New Issue
Block a user