mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
Compare commits
451 Commits
9cc7ebba01
...
wip/Jehan-
Author | SHA1 | Date | |
---|---|---|---|
|
37da2a5eab | ||
|
a7925510aa | ||
|
ce8ea93149 | ||
|
814972db43 | ||
|
a9b44e6812 | ||
|
e1a15c8f60 | ||
|
6556fd4e8a | ||
|
f37233c56e | ||
|
2b1eb29f47 | ||
|
45bd948079 | ||
|
e86911aba5 | ||
|
7dcb532bbd | ||
|
97ae6a4742 | ||
|
257f8350e1 | ||
|
d6d884b7ff | ||
|
691a5f3be5 | ||
|
7247072cd8 | ||
|
392f838bf5 | ||
|
e89e38e5c8 | ||
|
ad6705460d | ||
|
b8f614fbc6 | ||
|
8c1441058b | ||
|
2f143662cf | ||
|
4f663d2c22 | ||
|
6bde13dd50 | ||
|
647532dcab | ||
|
ee0542cbbf | ||
|
4e2d5c66d4 | ||
|
eba8d7daa5 | ||
|
72baf50e8a | ||
|
157acd1188 | ||
|
a0287f68e5 | ||
|
39435c3da4 | ||
|
712d7853ed | ||
|
8652fd371c | ||
|
c1330e3f8f | ||
|
e0a896ea4f | ||
|
208c3b3b6a | ||
|
ae23df5357 | ||
|
7a1f50f390 | ||
|
21ef2d91b9 | ||
|
88649af74a | ||
|
6eaaf770f3 | ||
|
e159c70c98 | ||
|
f698803e05 | ||
|
afb6d61c4c | ||
|
d541eb4add | ||
|
248a654455 | ||
|
89dbf5c31c | ||
|
8f262a25b2 | ||
|
ebfc55f543 | ||
|
f497abc790 | ||
|
41b4e1f39e | ||
|
dce2d8e022 | ||
|
de675cad67 | ||
|
ce477ca0f5 | ||
|
180c0f34e1 | ||
|
330ba11a9c | ||
|
48ff03a764 | ||
|
405f1a42a9 | ||
|
bc3358cf78 | ||
|
1ef81d49f6 | ||
|
aee1457198 | ||
|
dcdfa67846 | ||
|
10defa19ee | ||
|
2c302cf167 | ||
|
93a5818b2e | ||
|
9eb401bf3c | ||
|
edd23a90f1 | ||
|
ce61d9e5ee | ||
|
d7528f54b7 | ||
|
c759b3f9f4 | ||
|
c896a9c359 | ||
|
7c0191bc5d | ||
|
22a4369705 | ||
|
6f2045b2bc | ||
|
ba3879cde7 | ||
|
66f5f73c2f | ||
|
b77dccbcd0 | ||
|
539a206d8d | ||
|
debdf71688 | ||
|
c73c312219 | ||
|
aca4ec67ef | ||
|
b535ff259e | ||
|
e63cfebbd8 | ||
|
d63640f8f0 | ||
|
67768b8263 | ||
|
047f46f880 | ||
|
0c656bc1ba | ||
|
8589f04f57 | ||
|
bbd44bd787 | ||
|
e4b9246350 | ||
|
5ab13f42ee | ||
|
92187e6656 | ||
|
2a1c33c8a0 | ||
|
75a9f9f6a7 | ||
|
47b723a8b4 | ||
|
782f144365 | ||
|
9023482679 | ||
|
65b2bbb107 | ||
|
efbd42b7a3 | ||
|
63ee2dc560 | ||
|
dee0ae9b0d | ||
|
b4e6f5bf81 | ||
|
c775f28c89 | ||
|
9180025c54 | ||
|
d57d1f90f0 | ||
|
b9799fc0d2 | ||
|
ebb265e55f | ||
|
95651212fc | ||
|
2477c8cd72 | ||
|
2afc354de4 | ||
|
8a3091695a | ||
|
6ad0d8ecaa | ||
|
939b1c9921 | ||
|
f3a8922e7a | ||
|
673c8d0c77 | ||
|
e79de196ca | ||
|
d50343660b | ||
|
ff3e5b9314 | ||
|
a2cccd6236 | ||
|
1b4d9f6c4e | ||
|
db3118e097 | ||
|
8d20567b8f | ||
|
a6d601dbf5 | ||
|
b1f5535f8b | ||
|
e9515f4b62 | ||
|
355f00ec90 | ||
|
c4f518ae48 | ||
|
3e0958288d | ||
|
38d1aed803 | ||
|
581e728517 | ||
|
38ec91c1fb | ||
|
b22ff982b2 | ||
|
2e9873d041 | ||
|
fe6e25c3a8 | ||
|
474051447e | ||
|
5ca7087107 | ||
|
8603a21ad4 | ||
|
3fddd0a193 | ||
|
1eefb9a3a3 | ||
|
46ab2d1db0 | ||
|
b28a399124 | ||
|
30d74c02bc | ||
|
1ee174d735 | ||
|
5fa3e97bca | ||
|
925875da86 | ||
|
527157e7ec | ||
|
f8ab14ee2f | ||
|
b4cc79a1b8 | ||
|
4bf08d0757 | ||
|
7e508a13b9 | ||
|
9d9c86f894 | ||
|
fef197260f | ||
|
6a9e6374ef | ||
|
659b5f31d4 | ||
|
7d482ef792 | ||
|
06693a26b3 | ||
|
db84445a53 | ||
|
92af92c19e | ||
|
20baafc3ab | ||
|
e90a090863 | ||
|
395b9d140e | ||
|
8e493c79f9 | ||
|
08d203bf66 | ||
|
90033acb19 | ||
|
ebed9ab9ca | ||
|
e2ad2e98cb | ||
|
79e6b9517b | ||
|
dc3c112f44 | ||
|
55a899cc3b | ||
|
61e6a8b952 | ||
|
666ffdc344 | ||
|
0ee5f6c526 | ||
|
618cde4e68 | ||
|
5e85c7dcee | ||
|
d98c4d4391 | ||
|
5a2ec07623 | ||
|
331cf949cf | ||
|
b821ebf308 | ||
|
542716a552 | ||
|
5e0b0f2d30 | ||
|
f1d67ab1c3 | ||
|
c4fce180fc | ||
|
e85eb8bc95 | ||
|
163936281d | ||
|
34c638576b | ||
|
07ea551ccf | ||
|
9fc1aa9b04 | ||
|
53030c0c3e | ||
|
627c4c1616 | ||
|
c82f010f67 | ||
|
2a1d21df3a | ||
|
47b73615f8 | ||
|
2dcc55e719 | ||
|
a40b295aab | ||
|
0337754c41 | ||
|
13c1a7e1f1 | ||
|
0e02a6ada9 | ||
|
104d00db37 | ||
|
899b17ea5a | ||
|
fe407c0ddb | ||
|
190777baa7 | ||
|
5b05203f3f | ||
|
0f2a2273ef | ||
|
9fab93f1a1 | ||
|
2a3694ff65 | ||
|
5d9809f1e0 | ||
|
3b13d275e9 | ||
|
69750065fc | ||
|
29b216718c | ||
|
d48d2f89ba | ||
|
90c7ea98c7 | ||
|
0d9a44c2f4 | ||
|
79124d2975 | ||
|
461df51a63 | ||
|
13fc9f9737 | ||
|
31579748f6 | ||
|
3a7d24ee7a | ||
|
db56513c53 | ||
|
1bc2b3c595 | ||
|
7410961ae9 | ||
|
0015d28e41 | ||
|
5ba42112da | ||
|
fcb2f1e3c2 | ||
|
f277d05e79 | ||
|
45d70878a1 | ||
|
ab9b7454f2 | ||
|
c4abfd1379 | ||
|
7a30bd39b7 | ||
|
650446a83a | ||
|
3df3bcfaaa | ||
|
adc62480c8 | ||
|
0338340315 | ||
|
cbac5b0be9 | ||
|
6c24c6fbff | ||
|
4428218ce9 | ||
|
1f541731ed | ||
|
b2e642f1a0 | ||
|
1b96833141 | ||
|
9d7380d654 | ||
|
7d5962de21 | ||
|
01dba8d119 | ||
|
2f4de278ad | ||
|
eb756ed536 | ||
|
6463f607ee | ||
|
e291a56b17 | ||
|
8a33ba7fa0 | ||
|
e617f2c419 | ||
|
52ff170d59 | ||
|
e881f67eed | ||
|
5630e37509 | ||
|
0ae3cccf0d | ||
|
3fc22fe98d | ||
|
c212d03113 | ||
|
4ce28daf0c | ||
|
6f705caa3f | ||
|
2cc5002dd6 | ||
|
944ba6a99b | ||
|
e8a043090c | ||
|
43f43e2294 | ||
|
b8508d1488 | ||
|
dd1b40a6aa | ||
|
b937c37f1f | ||
|
c3ebd964f4 | ||
|
ea12bd8650 | ||
|
12d64b1313 | ||
|
b5f41df484 | ||
|
885ccfcc64 | ||
|
17844b28e9 | ||
|
f635078658 | ||
|
3f2c20374a | ||
|
575adf4152 | ||
|
940ec94a1c | ||
|
18c86d4269 | ||
|
4cefd8e160 | ||
|
98fa8e05a6 | ||
|
88e2300834 | ||
|
03d7bbfd68 | ||
|
f9deb951aa | ||
|
bbffc8201a | ||
|
a12e662c9f | ||
|
2c00aab4d8 | ||
|
36aabcafb0 | ||
|
db09b4f224 | ||
|
4123734393 | ||
|
872ca28081 | ||
|
dac594b048 | ||
|
9988e51acb | ||
|
27406def12 | ||
|
9ffe50f216 | ||
|
9695d61eb9 | ||
|
5b0ed2451b | ||
|
d791bc0e31 | ||
|
80927dc521 | ||
|
6f4f18b864 | ||
|
2ba9589012 | ||
|
e0aa0dcf48 | ||
|
d27355c76d | ||
|
c7be65f677 | ||
|
63d46108f2 | ||
|
d70ea37c34 | ||
|
70041b32f5 | ||
|
8337d68f59 | ||
|
95dd4c22cc | ||
|
6fe0505d7c | ||
|
bfaa275590 | ||
|
9c9b4f53a2 | ||
|
2737a29da9 | ||
|
942e8af3a0 | ||
|
9eafd331fe | ||
|
e89d3c0ec9 | ||
|
16abdeeac7 | ||
|
f22b3c3154 | ||
|
a05161569a | ||
|
398adf23dd | ||
|
333bf5423c | ||
|
c6516b69db | ||
|
54c403d392 | ||
|
cd6d049fc6 | ||
|
556a968fec | ||
|
8c42c18a52 | ||
|
8cedd774b5 | ||
|
de46a1d650 | ||
|
d52bde19c6 | ||
|
999e1007c7 | ||
|
4d55df5e66 | ||
|
79d54a96a1 | ||
|
37ac187a83 | ||
|
e2f960fb2a | ||
|
2057befc86 | ||
|
eb92f6f21e | ||
|
0a0a71488c | ||
|
ed74318ba6 | ||
|
0d94c985cc | ||
|
b39128122f | ||
|
1e168c9b60 | ||
|
81ec382714 | ||
|
db415d37df | ||
|
27080d11f1 | ||
|
a2ddb2700a | ||
|
cfa7c56e4f | ||
|
7b4c8bc7ec | ||
|
5ddf4309d6 | ||
|
4979c0eef2 | ||
|
7e01fc41ce | ||
|
1eedc67b68 | ||
|
832e2c00c7 | ||
|
f27a9f7b86 | ||
|
81616d5e0b | ||
|
e01385f5d0 | ||
|
b2f77839e6 | ||
|
f57d756a02 | ||
|
dbed39bf8a | ||
|
b3c1c50e75 | ||
|
d1a02eb93a | ||
|
b9e88b8600 | ||
|
444d31ff2d | ||
|
e82f5e851d | ||
|
604461dd1a | ||
|
43561b69a8 | ||
|
7739644a77 | ||
|
be1838f5ae | ||
|
47362d55d7 | ||
|
bd83645a37 | ||
|
8a96f4ff21 | ||
|
896c9f5cbe | ||
|
cc68acec1d | ||
|
f5e2d248aa | ||
|
869719c53b | ||
|
e266d01c91 | ||
|
9c37ba5b39 | ||
|
1be9cd3685 | ||
|
16e41b5351 | ||
|
567a433dce | ||
|
472b1dd7dc | ||
|
6f02c01c70 | ||
|
dc2ebd81ca | ||
|
6075c180c0 | ||
|
7b3618494a | ||
|
d11988b62b | ||
|
0ffba87159 | ||
|
181c5902f5 | ||
|
ba5a5e5af4 | ||
|
fe9ce8c9fe | ||
|
342e3d1b77 | ||
|
254403455b | ||
|
93171ace8d | ||
|
f5f8e72cee | ||
|
006f778609 | ||
|
2b7b48aa84 | ||
|
9c11b54843 | ||
|
24268542a2 | ||
|
31fea8e2af | ||
|
0f45181203 | ||
|
de5ee4ffb8 | ||
|
be1dfad618 | ||
|
3e58957970 | ||
|
fd423bd063 | ||
|
6c8349a5bc | ||
|
f0a60805f9 | ||
|
a6d7d996e4 | ||
|
3008ec665f | ||
|
370a10ebb9 | ||
|
d5326393d5 | ||
|
9909626ab6 | ||
|
4f761939f0 | ||
|
67a9bef378 | ||
|
8ab7ffdd35 | ||
|
06186da0e2 | ||
|
18939612e0 | ||
|
440b306982 | ||
|
0298074611 | ||
|
3d07c3f3dc | ||
|
467824d8d6 | ||
|
033004846a | ||
|
9d2a7613e5 | ||
|
090991a032 | ||
|
0df87d30af | ||
|
5de71e0f42 | ||
|
2eb41ed147 | ||
|
a59902469a | ||
|
7a29733aa4 | ||
|
eea635cf71 | ||
|
330254de86 | ||
|
20e3d76e47 | ||
|
2861591cb6 | ||
|
1a7cc5c59c | ||
|
aa7bf61c4c | ||
|
9a865c56f2 | ||
|
c3307851c3 | ||
|
3ccf60ca1c | ||
|
81ebd918ac | ||
|
e7b9915717 | ||
|
46f1f48729 | ||
|
18c9ffdd93 | ||
|
e84d90cb39 | ||
|
54905bb16b | ||
|
4cd1ef826f | ||
|
356de501ae | ||
|
13448eabda | ||
|
4bd930c46c | ||
|
5abee30588 | ||
|
2ef479117c | ||
|
1ef06a4f81 | ||
|
53e64e972f | ||
|
7a845fe60b | ||
|
99385bede6 | ||
|
330c33ae6e | ||
|
45fcdb62f7 | ||
|
05084b24b5 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -27,10 +27,10 @@
|
||||
/cscope.files
|
||||
/cscope.out
|
||||
/depcomp
|
||||
/gimp-2.0.pc
|
||||
/gimp-3.0.pc
|
||||
/gimp-zip
|
||||
/gimpthumb-2.0.pc
|
||||
/gimpui-2.0.pc
|
||||
/gimpthumb-3.0.pc
|
||||
/gimpui-3.0.pc
|
||||
/git-version.h
|
||||
/gtk-doc.make
|
||||
/install-sh
|
||||
|
@@ -36,7 +36,7 @@ SUBDIRS = \
|
||||
$(GIMP_MODULES) \
|
||||
$(GIMP_PLUGINS) \
|
||||
etc \
|
||||
devel-docs \
|
||||
## devel-docs \
|
||||
docs \
|
||||
build
|
||||
|
||||
|
4
app-tools/.gitignore
vendored
4
app-tools/.gitignore
vendored
@@ -2,5 +2,5 @@
|
||||
/Makefile.in
|
||||
/.deps
|
||||
/.libs
|
||||
/gimp-debug-tool-2.0
|
||||
/gimp-debug-tool-2.0.exe
|
||||
/gimp-debug-tool-3.0
|
||||
/gimp-debug-tool-3.0.exe
|
||||
|
@@ -118,8 +118,7 @@ buffers_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
GIMP_OBJECT (buffer));
|
||||
gimp_create_display (context->gimp, new_image,
|
||||
GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (new_image);
|
||||
}
|
||||
}
|
||||
|
@@ -79,8 +79,7 @@ data_open_as_image_cmd_callback (GtkAction *action,
|
||||
|
||||
image = file_open_with_display (context->gimp, context, NULL,
|
||||
file, FALSE,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget),
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
@@ -278,15 +277,13 @@ data_edit_cmd_callback (GtkAction *action,
|
||||
|
||||
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
|
||||
gint monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
|
||||
GtkWidget *dockable;
|
||||
GdkMonitor *monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
|
||||
GtkWidget *dockable;
|
||||
|
||||
dockable =
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)),
|
||||
context->gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
screen,
|
||||
monitor,
|
||||
value);
|
||||
|
||||
|
@@ -46,9 +46,9 @@ dialogs_create_toplevel_cmd_callback (GtkAction *action,
|
||||
|
||||
if (value)
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
NULL /*ui_manager*/,
|
||||
widget,
|
||||
value, -1, TRUE);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,6 @@ dialogs_create_dockable_cmd_callback (GtkAction *action,
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
|
||||
gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
value);
|
||||
}
|
||||
|
@@ -232,7 +232,7 @@ documents_clear_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -373,8 +373,7 @@ documents_open_image (GtkWidget *editor,
|
||||
file = gimp_imagefile_get_file (imagefile);
|
||||
|
||||
image = file_open_with_display (context->gimp, context, NULL, file, FALSE,
|
||||
G_OBJECT (gtk_widget_get_screen (editor)),
|
||||
gimp_widget_get_monitor (editor),
|
||||
G_OBJECT (gimp_widget_get_monitor (editor)),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
|
@@ -285,15 +285,6 @@ edit_actions_setup (GimpActionGroup *group)
|
||||
|
||||
pattern = gimp_context_get_pattern (context);
|
||||
edit_actions_pattern_changed (context, pattern, group);
|
||||
|
||||
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
|
||||
gimp_action_group_set_action_always_show_image (group, action, show)
|
||||
|
||||
SET_ALWAYS_SHOW_IMAGE ("edit-fill-fg", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("edit-fill-bg", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("edit-fill-pattern", TRUE);
|
||||
|
||||
#undef SET_ALWAYS_SHOW_IMAGE
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -163,7 +163,7 @@ edit_undo_clear_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -384,8 +384,7 @@ edit_paste_as_new_image_cmd_callback (GtkAction *action,
|
||||
if (image)
|
||||
{
|
||||
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (image);
|
||||
}
|
||||
else
|
||||
@@ -468,7 +467,6 @@ edit_named_paste_cmd_callback (GtkAction *action,
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
|
||||
gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
"gimp-buffer-list|gimp-buffer-grid");
|
||||
}
|
||||
|
@@ -99,7 +99,7 @@ error_console_save_cmd_callback (GtkAction *action,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -218,8 +218,6 @@ file_actions_setup (GimpActionGroup *group)
|
||||
for (i = 0; i < n_entries; i++)
|
||||
{
|
||||
gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
|
||||
gimp_action_group_set_action_always_show_image (group, entries[i].name,
|
||||
TRUE);
|
||||
gimp_action_group_set_action_context (group, entries[i].name,
|
||||
gimp_get_user_context (group->gimp));
|
||||
|
||||
|
@@ -148,9 +148,9 @@ file_open_location_cmd_callback (GtkAction *action,
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
NULL /*ui_manager*/,
|
||||
widget,
|
||||
"gimp-file-open-location-dialog", -1, TRUE);
|
||||
}
|
||||
|
||||
@@ -195,8 +195,7 @@ file_open_recent_cmd_callback (GtkAction *action,
|
||||
image = file_open_with_display (gimp, action_data_get_context (data),
|
||||
progress,
|
||||
file, FALSE,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget),
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
@@ -418,7 +417,7 @@ file_revert_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -464,8 +463,8 @@ file_close_all_cmd_callback (GtkAction *action,
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
widget,
|
||||
"gimp-close-all-dialog", -1);
|
||||
}
|
||||
}
|
||||
@@ -557,9 +556,9 @@ file_open_dialog_show (Gimp *gimp,
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (parent),
|
||||
gimp_widget_get_monitor (parent),
|
||||
NULL /*ui_manager*/,
|
||||
parent,
|
||||
"gimp-file-open-dialog", -1, FALSE);
|
||||
|
||||
if (dialog)
|
||||
@@ -611,9 +610,9 @@ file_save_dialog_show (Gimp *gimp,
|
||||
if (! dialog)
|
||||
{
|
||||
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (parent),
|
||||
gimp_widget_get_monitor (parent),
|
||||
NULL /*ui_manager*/,
|
||||
parent,
|
||||
"gimp-file-save-dialog",
|
||||
-1, FALSE);
|
||||
|
||||
@@ -693,9 +692,9 @@ file_export_dialog_show (Gimp *gimp,
|
||||
if (! dialog)
|
||||
{
|
||||
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (parent),
|
||||
gimp_widget_get_monitor (parent),
|
||||
NULL /*ui_manager*/,
|
||||
parent,
|
||||
"gimp-file-export-dialog",
|
||||
-1, FALSE);
|
||||
|
||||
|
@@ -480,7 +480,7 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -583,7 +583,7 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -83,7 +83,7 @@ gradients_save_as_pov_ray_cmd_callback (GtkAction *action,
|
||||
g_free (title);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -188,9 +188,9 @@ image_new_cmd_callback (GtkAction *action,
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
NULL /*ui_manager*/,
|
||||
widget,
|
||||
"gimp-image-new-dialog", -1, FALSE);
|
||||
|
||||
if (dialog)
|
||||
@@ -220,8 +220,7 @@ image_duplicate_cmd_callback (GtkAction *action,
|
||||
|
||||
gimp_create_display (new_image->gimp, new_image, shell->unit,
|
||||
gimp_zoom_model_get_factor (shell->zoom),
|
||||
G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (shell))),
|
||||
gimp_widget_get_monitor (GTK_WIDGET (shell)));
|
||||
G_OBJECT (gimp_widget_get_monitor (GTK_WIDGET (shell))));
|
||||
|
||||
g_object_unref (new_image);
|
||||
}
|
||||
|
@@ -87,8 +87,7 @@ images_new_view_cmd_callback (GtkAction *action,
|
||||
if (image && gimp_container_have (container, GIMP_OBJECT (image)))
|
||||
{
|
||||
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (editor))),
|
||||
gimp_widget_get_monitor (GTK_WIDGET (editor)));
|
||||
G_OBJECT (gimp_widget_get_monitor (GTK_WIDGET (editor))));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -61,9 +61,9 @@ palettes_import_cmd_callback (GtkAction *action,
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
NULL /*ui_manager*/,
|
||||
widget,
|
||||
"gimp-palette-import-dialog", -1, TRUE);
|
||||
}
|
||||
|
||||
|
@@ -182,7 +182,7 @@ plug_in_reset_all_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -405,7 +405,6 @@ select_save_cmd_callback (GtkAction *action,
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (image->gimp)),
|
||||
image->gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
"gimp-channel-list");
|
||||
}
|
||||
|
@@ -102,8 +102,7 @@ templates_create_image_cmd_callback (GtkAction *action,
|
||||
|
||||
image = gimp_image_new_from_template (gimp, template, context);
|
||||
gimp_create_display (gimp, image, gimp_template_get_unit (template), 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (image);
|
||||
|
||||
gimp_image_new_set_last_template (gimp, template);
|
||||
@@ -246,7 +245,7 @@ templates_delete_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -67,7 +67,7 @@ text_editor_load_cmd_callback (GtkAction *action,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -121,7 +121,7 @@ text_tool_load_cmd_callback (GtkAction *action,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -198,7 +198,7 @@ tool_options_reset_all_cmd_callback (GtkAction *action,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -244,7 +244,6 @@ tool_options_show_preset_editor (Gimp *gimp,
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
|
||||
gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (GTK_WIDGET (editor)),
|
||||
gimp_widget_get_monitor (GTK_WIDGET (editor)),
|
||||
"gimp-tool-preset-editor");
|
||||
|
||||
|
@@ -1018,14 +1018,13 @@ view_actions_update (GimpActionGroup *group,
|
||||
|
||||
if (shell->canvas)
|
||||
{
|
||||
GtkStyle *style = gtk_widget_get_style (shell->canvas);
|
||||
GimpRGB color;
|
||||
GtkStyleContext *style = gtk_widget_get_style_context (shell->canvas);
|
||||
GdkRGBA color;
|
||||
|
||||
gtk_widget_ensure_style (shell->canvas);
|
||||
gimp_rgb_set_gdk_color (&color, style->bg + GTK_STATE_NORMAL);
|
||||
gimp_rgb_set_alpha (&color, GIMP_OPACITY_OPAQUE);
|
||||
gtk_style_context_get_background_color (style, 0, &color);
|
||||
gimp_rgb_set_alpha ((GimpRGB *) &color, GIMP_OPACITY_OPAQUE);
|
||||
|
||||
SET_COLOR ("view-padding-color-theme", &color);
|
||||
SET_COLOR ("view-padding-color-theme", (GimpRGB *) &color);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -104,8 +104,7 @@ view_new_cmd_callback (GtkAction *action,
|
||||
gimp_create_display (display->gimp,
|
||||
gimp_display_get_image (display),
|
||||
shell->unit, gimp_zoom_model_get_factor (shell->zoom),
|
||||
G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (shell))),
|
||||
gimp_widget_get_monitor (GTK_WIDGET (shell)));
|
||||
G_OBJECT (gimp_widget_get_monitor (GTK_WIDGET (shell))));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -472,7 +471,6 @@ view_navigation_window_cmd_callback (GtkAction *action,
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
|
||||
gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (GTK_WIDGET (shell)),
|
||||
gimp_widget_get_monitor (GTK_WIDGET (shell)),
|
||||
"gimp-navigation-view");
|
||||
}
|
||||
|
@@ -77,7 +77,7 @@ window_open_display_cmd_callback (GtkAction *action,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -354,9 +354,6 @@ windows_actions_image_notify (GimpDisplay *display,
|
||||
|
||||
gimp_action_group_add_actions (group, NULL, &entry, 1);
|
||||
|
||||
gimp_action_group_set_action_always_show_image (group, action_name,
|
||||
TRUE);
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
action_name);
|
||||
|
||||
|
@@ -193,7 +193,6 @@ windows_open_recent_cmd_callback (GtkAction *action,
|
||||
info);
|
||||
|
||||
gimp_session_info_restore (info, gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget));
|
||||
|
||||
g_object_unref (info);
|
||||
|
21
app/app.c
21
app/app.c
@@ -86,14 +86,15 @@ static gboolean app_exit_after_callback (Gimp *gimp,
|
||||
gboolean kill_it,
|
||||
GMainLoop **loop);
|
||||
|
||||
#if 0
|
||||
/* left here as documentation how to do compat enums */
|
||||
GType gimp_convert_dither_type_compat_get_type (void); /* compat cruft */
|
||||
GType gimp_layer_mode_effects_get_type (void); /* compat cruft */
|
||||
#endif
|
||||
|
||||
|
||||
/* local variables */
|
||||
|
||||
static GObject *initial_screen = NULL;
|
||||
static gint initial_monitor = 0;
|
||||
static GObject *initial_monitor = NULL;
|
||||
|
||||
|
||||
/* public functions */
|
||||
@@ -102,7 +103,9 @@ void
|
||||
app_libs_init (GOptionContext *context,
|
||||
gboolean no_interface)
|
||||
{
|
||||
#if 0
|
||||
GQuark quark;
|
||||
#endif
|
||||
|
||||
/* disable OpenCL before GEGL is even initialized; this way we only
|
||||
* enable if wanted in gimprc, instead of always enabling, and then
|
||||
@@ -122,13 +125,15 @@ app_libs_init (GOptionContext *context,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* left here as documentation how to do compat enums */
|
||||
|
||||
/* keep compat enum code in sync with pdb/enumcode.pl */
|
||||
quark = g_quark_from_static_string ("gimp-compat-enum");
|
||||
|
||||
g_type_set_qdata (GIMP_TYPE_CONVERT_DITHER_TYPE, quark,
|
||||
(gpointer) gimp_convert_dither_type_compat_get_type ());
|
||||
g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark,
|
||||
(gpointer) gimp_layer_mode_effects_get_type ());
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -366,7 +371,6 @@ app_run (const gchar *full_prog_name,
|
||||
gimp_get_user_context (gimp),
|
||||
NULL,
|
||||
file, as_new,
|
||||
initial_screen,
|
||||
initial_monitor,
|
||||
&status, &error);
|
||||
if (image)
|
||||
@@ -409,7 +413,6 @@ app_run (const gchar *full_prog_name,
|
||||
GFile *file = g_file_new_for_commandline_arg (filenames[i]);
|
||||
|
||||
file_open_from_command_line (gimp, file, as_new,
|
||||
initial_screen,
|
||||
initial_monitor);
|
||||
|
||||
g_object_unref (file);
|
||||
@@ -465,12 +468,14 @@ static void
|
||||
app_restore_after_callback (Gimp *gimp,
|
||||
GimpInitStatusFunc status_callback)
|
||||
{
|
||||
gint dummy;
|
||||
|
||||
/* Getting the display name for a -1 display returns the initial
|
||||
* monitor during startup. Need to call this from a restore_after
|
||||
* callback, because before restore(), the GUI can't return anything,
|
||||
* after after restore() the initial monitor gets reset.
|
||||
*/
|
||||
g_free (gimp_get_display_name (gimp, -1, &initial_screen, &initial_monitor));
|
||||
g_free (gimp_get_display_name (gimp, -1, &initial_monitor, &dummy));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -118,8 +118,8 @@ static const gchar system_gimprc_header[] =
|
||||
"documents the default values and shows what changes are possible.\n"
|
||||
"\n"
|
||||
"The variable ${gimp_dir} is set to the value of the environment "
|
||||
"variable GIMP2_DIRECTORY or, if that is not set, the compiled-in "
|
||||
"default value is used. If GIMP2_DIRECTORY is not an absolute path, "
|
||||
"variable GIMP3_DIRECTORY or, if that is not set, the compiled-in "
|
||||
"default value is used. If GIMP3_DIRECTORY is not an absolute path, "
|
||||
"it is interpreted relative to your home directory.";
|
||||
|
||||
static void
|
||||
@@ -249,21 +249,21 @@ static const gchar *man_page_path =
|
||||
".TP\n"
|
||||
".I gimp_dir\n"
|
||||
"The personal gimp directory which is set to the value of the environment\n"
|
||||
"variable GIMP2_DIRECTORY or to @manpage_gimpdir@.\n"
|
||||
"variable GIMP3_DIRECTORY or to @manpage_gimpdir@.\n"
|
||||
".TP\n"
|
||||
".I gimp_data_dir\n"
|
||||
"Base for paths to shareable data, which is set to the value of the\n"
|
||||
"environment variable GIMP2_DATADIR or to the compiled-in default value\n"
|
||||
"environment variable GIMP3_DATADIR or to the compiled-in default value\n"
|
||||
"@gimpdatadir@.\n"
|
||||
".TP\n"
|
||||
".I gimp_plug_in_dir\n"
|
||||
"Base to paths for architecture-specific plug-ins and modules, which is set\n"
|
||||
"to the value of the environment variable GIMP2_PLUGINDIR or to the\n"
|
||||
"to the value of the environment variable GIMP3_PLUGINDIR or to the\n"
|
||||
"compiled-in default value @gimpplugindir@.\n"
|
||||
".TP\n"
|
||||
".I gimp_sysconf_dir\n"
|
||||
"Path to configuration files, which is set to the value of the environment\n"
|
||||
"variable GIMP2_SYSCONFDIR or to the compiled-in default value \n"
|
||||
"variable GIMP3_SYSCONFDIR or to the compiled-in default value \n"
|
||||
"@gimpsysconfdir@.\n"
|
||||
"\n";
|
||||
|
||||
|
@@ -64,7 +64,6 @@ enum
|
||||
PROP_RESTORE_MONITOR,
|
||||
PROP_SAVE_TOOL_OPTIONS,
|
||||
PROP_SHOW_TOOLTIPS,
|
||||
PROP_TEAROFF_MENUS,
|
||||
PROP_CAN_CHANGE_ACCELS,
|
||||
PROP_SAVE_ACCELS,
|
||||
PROP_RESTORE_ACCELS,
|
||||
@@ -76,6 +75,7 @@ enum
|
||||
PROP_TOOLBOX_WILBER,
|
||||
PROP_THEME_PATH,
|
||||
PROP_THEME,
|
||||
PROP_PREFER_DARK_THEME,
|
||||
PROP_ICON_THEME_PATH,
|
||||
PROP_ICON_THEME,
|
||||
PROP_ICON_SIZE,
|
||||
@@ -235,13 +235,6 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
||||
GIMP_PARAM_STATIC_STRINGS |
|
||||
GIMP_CONFIG_PARAM_RESTART);
|
||||
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_TEAROFF_MENUS,
|
||||
"tearoff-menus",
|
||||
"Tearoff menus",
|
||||
TEAROFF_MENUS_BLURB,
|
||||
TRUE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_CAN_CHANGE_ACCELS,
|
||||
"can-change-accels",
|
||||
"Can change accelerators",
|
||||
@@ -323,6 +316,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
||||
GIMP_CONFIG_DEFAULT_THEME,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PREFER_DARK_THEME,
|
||||
"prefer-dark-theme",
|
||||
"Prefer Dark Theme",
|
||||
THEME_BLURB,
|
||||
TRUE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
path = gimp_config_build_data_path ("icons");
|
||||
GIMP_CONFIG_PROP_PATH (object_class, PROP_ICON_THEME_PATH,
|
||||
"icon-theme-path",
|
||||
@@ -607,9 +607,6 @@ gimp_gui_config_set_property (GObject *object,
|
||||
case PROP_SHOW_TOOLTIPS:
|
||||
gui_config->show_tooltips = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_TEAROFF_MENUS:
|
||||
gui_config->tearoff_menus = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_CAN_CHANGE_ACCELS:
|
||||
gui_config->can_change_accels = g_value_get_boolean (value);
|
||||
break;
|
||||
@@ -645,6 +642,9 @@ gimp_gui_config_set_property (GObject *object,
|
||||
g_free (gui_config->theme);
|
||||
gui_config->theme = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_PREFER_DARK_THEME:
|
||||
gui_config->prefer_dark_theme = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_ICON_THEME_PATH:
|
||||
g_free (gui_config->icon_theme_path);
|
||||
gui_config->icon_theme_path = g_value_dup_string (value);
|
||||
@@ -792,9 +792,6 @@ gimp_gui_config_get_property (GObject *object,
|
||||
case PROP_SHOW_TOOLTIPS:
|
||||
g_value_set_boolean (value, gui_config->show_tooltips);
|
||||
break;
|
||||
case PROP_TEAROFF_MENUS:
|
||||
g_value_set_boolean (value, gui_config->tearoff_menus);
|
||||
break;
|
||||
case PROP_CAN_CHANGE_ACCELS:
|
||||
g_value_set_boolean (value, gui_config->can_change_accels);
|
||||
break;
|
||||
@@ -828,6 +825,9 @@ gimp_gui_config_get_property (GObject *object,
|
||||
case PROP_THEME:
|
||||
g_value_set_string (value, gui_config->theme);
|
||||
break;
|
||||
case PROP_PREFER_DARK_THEME:
|
||||
g_value_set_boolean (value, gui_config->prefer_dark_theme);
|
||||
break;
|
||||
case PROP_ICON_THEME_PATH:
|
||||
g_value_set_string (value, gui_config->icon_theme_path);
|
||||
break;
|
||||
|
@@ -53,7 +53,6 @@ struct _GimpGuiConfig
|
||||
gboolean restore_monitor;
|
||||
gboolean save_tool_options;
|
||||
gboolean show_tooltips;
|
||||
gboolean tearoff_menus;
|
||||
gboolean can_change_accels;
|
||||
gboolean save_accels;
|
||||
gboolean restore_accels;
|
||||
@@ -65,6 +64,7 @@ struct _GimpGuiConfig
|
||||
gboolean toolbox_wilber;
|
||||
gchar *theme_path;
|
||||
gchar *theme;
|
||||
gboolean prefer_dark_theme;
|
||||
gchar *icon_theme_path;
|
||||
gchar *icon_theme;
|
||||
GimpIconSize icon_size;
|
||||
|
@@ -429,9 +429,6 @@ _("Sets the swap file location. GIMP uses a tile based memory allocation " \
|
||||
"a folder that is mounted over NFS. For these reasons, it may be " \
|
||||
"desirable to put your swap file in \"/tmp\".")
|
||||
|
||||
#define TEAROFF_MENUS_BLURB \
|
||||
_("When enabled, menus can be torn off.")
|
||||
|
||||
#define CAN_CHANGE_ACCELS_BLURB \
|
||||
_("When enabled, you can change keyboard shortcuts for menu items " \
|
||||
"by hitting a key combination while the menu item is highlighted.")
|
||||
|
@@ -255,7 +255,6 @@ struct _GimpCoords
|
||||
gdouble yscale;
|
||||
gdouble angle; /* the view rotation angle */
|
||||
gboolean reflect; /* whether the view is reflected */
|
||||
gboolean extended;
|
||||
};
|
||||
|
||||
/* temp hack as replacement for GdkSegment */
|
||||
|
@@ -219,18 +219,18 @@ gimp_get_program_class (Gimp *gimp)
|
||||
gchar *
|
||||
gimp_get_display_name (Gimp *gimp,
|
||||
gint display_ID,
|
||||
GObject **screen,
|
||||
gint *monitor)
|
||||
GObject **monitor,
|
||||
gint *monitor_number)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (screen != NULL, NULL);
|
||||
g_return_val_if_fail (monitor != NULL, NULL);
|
||||
g_return_val_if_fail (monitor_number != NULL, NULL);
|
||||
|
||||
if (gimp->gui.get_display_name)
|
||||
return gimp->gui.get_display_name (gimp, display_ID, screen, monitor);
|
||||
return gimp->gui.get_display_name (gimp, display_ID,
|
||||
monitor, monitor_number);
|
||||
|
||||
*screen = NULL;
|
||||
*monitor = 0;
|
||||
*monitor = NULL;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -343,15 +343,14 @@ gimp_create_display (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GimpUnit unit,
|
||||
gdouble scale,
|
||||
GObject *screen,
|
||||
gint monitor)
|
||||
GObject *monitor)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), NULL);
|
||||
g_return_val_if_fail (screen == NULL || G_IS_OBJECT (screen), NULL);
|
||||
g_return_val_if_fail (monitor == NULL || G_IS_OBJECT (monitor), NULL);
|
||||
|
||||
if (gimp->gui.display_create)
|
||||
return gimp->gui.display_create (gimp, image, unit, scale, screen, monitor);
|
||||
return gimp->gui.display_create (gimp, image, unit, scale, monitor);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -44,8 +44,8 @@ struct _GimpGui
|
||||
const gchar * (* get_program_class) (Gimp *gimp);
|
||||
gchar * (* get_display_name) (Gimp *gimp,
|
||||
gint display_ID,
|
||||
GObject **screen,
|
||||
gint *monitor);
|
||||
GObject **monitor,
|
||||
gint *monitor_number);
|
||||
guint32 (* get_user_time) (Gimp *gimp);
|
||||
|
||||
GFile * (* get_theme_dir) (Gimp *gimp);
|
||||
@@ -61,8 +61,7 @@ struct _GimpGui
|
||||
GimpImage *image,
|
||||
GimpUnit unit,
|
||||
gdouble scale,
|
||||
GObject *screen,
|
||||
gint monitor);
|
||||
GObject *monitor);
|
||||
void (* display_delete) (GimpObject *display);
|
||||
void (* displays_reconnect) (Gimp *gimp,
|
||||
GimpImage *old_image,
|
||||
@@ -128,8 +127,7 @@ GimpObject * gimp_create_display (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GimpUnit unit,
|
||||
gdouble scale,
|
||||
GObject *screen,
|
||||
gint monitor);
|
||||
GObject *monitor);
|
||||
void gimp_delete_display (Gimp *gimp,
|
||||
GimpObject *display);
|
||||
void gimp_reconnect_displays (Gimp *gimp,
|
||||
@@ -158,8 +156,8 @@ void gimp_free_progress (Gimp *gimp,
|
||||
const gchar * gimp_get_program_class (Gimp *gimp);
|
||||
gchar * gimp_get_display_name (Gimp *gimp,
|
||||
gint display_ID,
|
||||
GObject **screen,
|
||||
gint *monitor);
|
||||
GObject **monitor,
|
||||
gint *monitor_number);
|
||||
guint32 gimp_get_user_time (Gimp *gimp);
|
||||
GFile * gimp_get_theme_dir (Gimp *gimp);
|
||||
GFile * gimp_get_icon_theme_dir (Gimp *gimp);
|
||||
|
@@ -68,8 +68,7 @@ gimp_modules_load (Gimp *gimp)
|
||||
if (gimp->no_interface)
|
||||
return;
|
||||
|
||||
/* FIXME, gimp->be_verbose is not yet initialized in init() */
|
||||
gimp->module_db->verbose = gimp->be_verbose;
|
||||
gimp_module_db_set_verbose (gimp->module_db, gimp->be_verbose);
|
||||
|
||||
file = gimp_directory_file ("modulerc", NULL);
|
||||
|
||||
@@ -179,7 +178,8 @@ gimp_modules_unload (Gimp *gimp)
|
||||
GError *error = NULL;
|
||||
|
||||
str = g_string_new (NULL);
|
||||
g_list_foreach (gimp->module_db->modules, add_to_inhibit_string, str);
|
||||
g_list_foreach (gimp_module_db_get_modules (gimp->module_db),
|
||||
add_to_inhibit_string, str);
|
||||
if (str->len > 0)
|
||||
p = str->str + 1;
|
||||
else
|
||||
|
@@ -88,7 +88,7 @@ static const struct
|
||||
}
|
||||
gimp_user_install_items[] =
|
||||
{
|
||||
{ "gtkrc", USER_INSTALL_COPY },
|
||||
{ "gimp.css", USER_INSTALL_COPY },
|
||||
{ "menurc", USER_INSTALL_COPY },
|
||||
{ "brushes", USER_INSTALL_MKDIR },
|
||||
{ "dynamics", USER_INSTALL_MKDIR },
|
||||
@@ -887,7 +887,8 @@ user_install_migrate_files (GimpUserInstall *install)
|
||||
g_str_has_prefix (basename, "gimpswap.") ||
|
||||
strcmp (basename, "pluginrc") == 0 ||
|
||||
strcmp (basename, "themerc") == 0 ||
|
||||
strcmp (basename, "toolrc") == 0)
|
||||
strcmp (basename, "toolrc") == 0 ||
|
||||
strcmp (basename, "gtkrc") == 0)
|
||||
{
|
||||
goto next_file;
|
||||
}
|
||||
|
@@ -854,7 +854,7 @@ gimp_create_image_from_buffer (Gimp *gimp,
|
||||
NULL /* same image */);
|
||||
gimp_image_add_layer (image, layer, NULL, -1, FALSE);
|
||||
|
||||
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0, NULL, 0);
|
||||
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0, NULL);
|
||||
|
||||
/* unref the image unconditionally, even when no display was created */
|
||||
g_object_add_weak_pointer (G_OBJECT (image), (gpointer) &image);
|
||||
|
@@ -51,7 +51,6 @@ gimp_coords_mix (const gdouble amul,
|
||||
ret_val->wheel = amul * a->wheel + bmul * b->wheel;
|
||||
ret_val->velocity = amul * a->velocity + bmul * b->velocity;
|
||||
ret_val->direction = amul * a->direction + bmul * b->direction;
|
||||
ret_val->extended = b->extended || a->extended;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -63,7 +62,6 @@ gimp_coords_mix (const gdouble amul,
|
||||
ret_val->wheel = amul * a->wheel;
|
||||
ret_val->velocity = amul * a->velocity;
|
||||
ret_val->direction = amul * a->direction;
|
||||
ret_val->extended = a->extended;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -42,6 +42,7 @@ VOID: DOUBLE
|
||||
VOID: DOUBLE, DOUBLE
|
||||
VOID: DOUBLE, DOUBLE, DOUBLE, DOUBLE
|
||||
VOID: ENUM
|
||||
VOID: ENUM, DOUBLE
|
||||
VOID: ENUM, INT
|
||||
VOID: ENUM, INT, BOOLEAN
|
||||
VOID: ENUM, OBJECT
|
||||
|
@@ -28,11 +28,6 @@
|
||||
|
||||
#include "dialogs-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "pdb/gimppdb.h"
|
||||
|
||||
#include "about.h"
|
||||
#include "git-version.h"
|
||||
|
||||
@@ -63,7 +58,6 @@ typedef struct
|
||||
|
||||
gint index;
|
||||
gint animstep;
|
||||
gint textrange[2];
|
||||
gint state;
|
||||
gboolean visible;
|
||||
} GimpAboutDialog;
|
||||
@@ -76,8 +70,8 @@ static void about_dialog_unmap (GtkWidget *widget,
|
||||
static GdkPixbuf * about_dialog_load_logo (void);
|
||||
static void about_dialog_add_animation (GtkWidget *vbox,
|
||||
GimpAboutDialog *dialog);
|
||||
static gboolean about_dialog_anim_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
static gboolean about_dialog_anim_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
GimpAboutDialog *dialog);
|
||||
static void about_dialog_reshuffle (GimpAboutDialog *dialog);
|
||||
static gboolean about_dialog_timer (gpointer data);
|
||||
@@ -89,12 +83,10 @@ static void about_dialog_add_unstable_message
|
||||
|
||||
|
||||
GtkWidget *
|
||||
about_dialog_create (GimpContext *context)
|
||||
about_dialog_create (void)
|
||||
{
|
||||
static GimpAboutDialog dialog;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
|
||||
if (! dialog.dialog)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
@@ -167,8 +159,6 @@ about_dialog_create (GimpContext *context)
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog.dialog));
|
||||
|
||||
return dialog.dialog;
|
||||
}
|
||||
|
||||
@@ -246,8 +236,8 @@ about_dialog_add_animation (GtkWidget *vbox,
|
||||
|
||||
gtk_widget_set_size_request (dialog->anim_area, -1, 2 * height);
|
||||
|
||||
g_signal_connect (dialog->anim_area, "expose-event",
|
||||
G_CALLBACK (about_dialog_anim_expose),
|
||||
g_signal_connect (dialog->anim_area, "draw",
|
||||
G_CALLBACK (about_dialog_anim_draw),
|
||||
dialog);
|
||||
}
|
||||
|
||||
@@ -278,22 +268,36 @@ about_dialog_reshuffle (GimpAboutDialog *dialog)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
about_dialog_anim_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
GimpAboutDialog *dialog)
|
||||
about_dialog_anim_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
GimpAboutDialog *dialog)
|
||||
{
|
||||
GtkStyle *style = gtk_widget_get_style (widget);
|
||||
cairo_t *cr;
|
||||
GtkAllocation allocation;
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
GtkStyleContext *style = gtk_widget_get_style_context (widget);
|
||||
GtkAllocation allocation;
|
||||
GdkRGBA color;
|
||||
gdouble alpha = 0.0;
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
|
||||
if (! dialog->visible)
|
||||
return FALSE;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
if (dialog->animstep < 16)
|
||||
{
|
||||
alpha = (gfloat) dialog->animstep / 15.0;
|
||||
}
|
||||
else if (dialog->animstep < 18)
|
||||
{
|
||||
alpha = 1.0;
|
||||
}
|
||||
else if (dialog->animstep < 33)
|
||||
{
|
||||
alpha = 1.0 - ((gfloat) (dialog->animstep - 17)) / 15.0;
|
||||
}
|
||||
|
||||
gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_NORMAL]);
|
||||
gtk_style_context_get_color (style, gtk_style_context_get_state (style),
|
||||
&color);
|
||||
gdk_cairo_set_source_rgba (cr, &color);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
pango_layout_get_pixel_size (dialog->layout, &width, &height);
|
||||
@@ -301,27 +305,14 @@ about_dialog_anim_expose (GtkWidget *widget,
|
||||
x = (allocation.width - width) / 2;
|
||||
y = (allocation.height - height) / 2;
|
||||
|
||||
if (dialog->textrange[1] > 0)
|
||||
{
|
||||
GdkRegion *covered_region;
|
||||
|
||||
covered_region = gdk_pango_layout_get_clip_region (dialog->layout,
|
||||
x, y,
|
||||
dialog->textrange, 1);
|
||||
|
||||
gdk_region_intersect (covered_region, event->region);
|
||||
|
||||
gdk_cairo_region (cr, covered_region);
|
||||
cairo_clip (cr);
|
||||
|
||||
gdk_region_destroy (covered_region);
|
||||
}
|
||||
|
||||
cairo_move_to (cr, x, y);
|
||||
|
||||
cairo_push_group (cr);
|
||||
|
||||
pango_cairo_show_layout (cr, dialog->layout);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_pop_group_to_source (cr);
|
||||
cairo_paint_with_alpha (cr, alpha);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -349,68 +340,37 @@ insert_spacers (const gchar *string)
|
||||
return g_string_free (str, FALSE);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mix_colors (const GdkColor *start,
|
||||
const GdkColor *end,
|
||||
GdkColor *target,
|
||||
gdouble pos)
|
||||
{
|
||||
target->red = start->red * (1.0 - pos) + end->red * pos;
|
||||
target->green = start->green * (1.0 - pos) + end->green * pos;
|
||||
target->blue = start->blue * (1.0 - pos) + end->blue * pos;
|
||||
}
|
||||
|
||||
static void
|
||||
decorate_text (GimpAboutDialog *dialog,
|
||||
gint anim_type,
|
||||
gdouble time)
|
||||
{
|
||||
GtkStyle *style = gtk_widget_get_style (dialog->anim_area);
|
||||
const gchar *text;
|
||||
const gchar *ptr;
|
||||
gint letter_count = 0;
|
||||
gint text_length = 0;
|
||||
gint text_bytelen = 0;
|
||||
gint cluster_start, cluster_end;
|
||||
gunichar unichr;
|
||||
PangoAttrList *attrlist = NULL;
|
||||
PangoAttribute *attr;
|
||||
PangoRectangle irect = {0, 0, 0, 0};
|
||||
PangoRectangle lrect = {0, 0, 0, 0};
|
||||
GdkColor mix;
|
||||
|
||||
mix_colors (style->bg + GTK_STATE_NORMAL,
|
||||
style->fg + GTK_STATE_NORMAL, &mix, time);
|
||||
|
||||
text = pango_layout_get_text (dialog->layout);
|
||||
|
||||
g_return_if_fail (text != NULL);
|
||||
|
||||
text_length = g_utf8_strlen (text, -1);
|
||||
text_bytelen = strlen (text);
|
||||
|
||||
attrlist = pango_attr_list_new ();
|
||||
|
||||
dialog->textrange[0] = 0;
|
||||
dialog->textrange[1] = text_bytelen;
|
||||
|
||||
switch (anim_type)
|
||||
{
|
||||
case 0: /* Fade in */
|
||||
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = text_bytelen;
|
||||
pango_attr_list_insert (attrlist, attr);
|
||||
break;
|
||||
|
||||
case 1: /* Fade in, spread */
|
||||
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = text_bytelen;
|
||||
pango_attr_list_change (attrlist, attr);
|
||||
|
||||
ptr = text;
|
||||
|
||||
cluster_start = 0;
|
||||
|
||||
while ((unichr = g_utf8_get_char (ptr)))
|
||||
{
|
||||
ptr = g_utf8_next_char (ptr);
|
||||
@@ -429,11 +389,6 @@ decorate_text (GimpAboutDialog *dialog,
|
||||
break;
|
||||
|
||||
case 2: /* Fade in, sinewave */
|
||||
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = text_bytelen;
|
||||
pango_attr_list_change (attrlist, attr);
|
||||
|
||||
ptr = text;
|
||||
|
||||
cluster_start = 0;
|
||||
@@ -458,46 +413,6 @@ decorate_text (GimpAboutDialog *dialog,
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* letterwise Fade in */
|
||||
ptr = text;
|
||||
|
||||
letter_count = 0;
|
||||
cluster_start = 0;
|
||||
|
||||
while ((unichr = g_utf8_get_char (ptr)))
|
||||
{
|
||||
gint border = (text_length + 15) * time - 15;
|
||||
gdouble pos;
|
||||
|
||||
if (letter_count < border)
|
||||
pos = 0;
|
||||
else if (letter_count > border + 15)
|
||||
pos = 1;
|
||||
else
|
||||
pos = ((gdouble) (letter_count - border)) / 15;
|
||||
|
||||
mix_colors (style->fg + GTK_STATE_NORMAL,
|
||||
style->bg + GTK_STATE_NORMAL,
|
||||
&mix, pos);
|
||||
|
||||
ptr = g_utf8_next_char (ptr);
|
||||
|
||||
cluster_end = ptr - text;
|
||||
|
||||
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
|
||||
attr->start_index = cluster_start;
|
||||
attr->end_index = cluster_end;
|
||||
pango_attr_list_change (attrlist, attr);
|
||||
|
||||
if (pos < 1.0)
|
||||
dialog->textrange[1] = cluster_end;
|
||||
|
||||
letter_count++;
|
||||
cluster_start = cluster_end;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
g_printerr ("Unknown animation type %d\n", anim_type);
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#define __ABOUT_DIALOG_H__
|
||||
|
||||
|
||||
GtkWidget * about_dialog_create (GimpContext *context);
|
||||
GtkWidget * about_dialog_create (void);
|
||||
|
||||
|
||||
#endif /* __ABOUT_DIALOG_H__ */
|
||||
|
@@ -218,7 +218,7 @@ color_profile_dialog_new (ColorProfileDialogType dialog_type,
|
||||
|
||||
private->dialog = dialog;
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -106,7 +106,7 @@ color_profile_import_dialog_run (GimpImage *image,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -140,7 +140,7 @@ convert_indexed_dialog_new (GimpImage *image,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -169,7 +169,7 @@ convert_precision_dialog_new (GimpImage *image,
|
||||
|
||||
g_free (blurb);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -88,7 +88,7 @@ data_delete_dialog_new (GimpDataFactory *factory,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -195,7 +195,7 @@ dialogs_about_get (GimpDialogFactory *factory,
|
||||
GimpUIManager *ui_manager,
|
||||
gint view_size)
|
||||
{
|
||||
return about_dialog_create (context);
|
||||
return about_dialog_create ();
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@@ -211,12 +211,10 @@ GimpContainer *global_recent_docks = NULL;
|
||||
|
||||
|
||||
static GtkWidget * dialogs_restore_dialog (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
gint monitor,
|
||||
GdkMonitor *monitor,
|
||||
GimpSessionInfo *info);
|
||||
static GtkWidget * dialogs_restore_window (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
gint monitor,
|
||||
GdkMonitor *monitor,
|
||||
GimpSessionInfo *info);
|
||||
|
||||
|
||||
@@ -448,7 +446,6 @@ static const GimpDialogFactoryEntry entries[] =
|
||||
* dialogs_restore_dialog:
|
||||
* @factory:
|
||||
* @screen:
|
||||
* @monitor:
|
||||
* @info:
|
||||
*
|
||||
* Creates a top level widget based on the given session info object
|
||||
@@ -459,20 +456,23 @@ static const GimpDialogFactoryEntry entries[] =
|
||||
**/
|
||||
static GtkWidget *
|
||||
dialogs_restore_dialog (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
gint monitor,
|
||||
GdkMonitor *monitor,
|
||||
GimpSessionInfo *info)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GimpCoreConfig *config = gimp_dialog_factory_get_context (factory)->gimp->config;
|
||||
GtkWidget *dialog;
|
||||
Gimp *gimp = gimp_dialog_factory_get_context (factory)->gimp;
|
||||
GimpCoreConfig *config = gimp->config;
|
||||
GimpDisplay *display = GIMP_DISPLAY (gimp_get_empty_display (gimp));
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
GIMP_LOG (DIALOG_FACTORY, "restoring toplevel \"%s\" (info %p)",
|
||||
gimp_session_info_get_factory_entry (info)->identifier,
|
||||
info);
|
||||
|
||||
dialog =
|
||||
gimp_dialog_factory_dialog_new (factory, screen, monitor,
|
||||
gimp_dialog_factory_dialog_new (factory, monitor,
|
||||
NULL /*ui_manager*/,
|
||||
GTK_WIDGET (gimp_display_shell_get_window (shell)),
|
||||
gimp_session_info_get_factory_entry (info)->identifier,
|
||||
gimp_session_info_get_factory_entry (info)->view_size,
|
||||
! GIMP_GUI_CONFIG (config)->hide_docks);
|
||||
@@ -488,7 +488,6 @@ dialogs_restore_dialog (GimpDialogFactory *factory,
|
||||
/**
|
||||
* dialogs_restore_window:
|
||||
* @factory:
|
||||
* @screen:
|
||||
* @monitor:
|
||||
* @info:
|
||||
*
|
||||
@@ -500,8 +499,7 @@ dialogs_restore_dialog (GimpDialogFactory *factory,
|
||||
**/
|
||||
static GtkWidget *
|
||||
dialogs_restore_window (GimpDialogFactory *factory,
|
||||
GdkScreen *screen,
|
||||
gint monitor,
|
||||
GdkMonitor *monitor,
|
||||
GimpSessionInfo *info)
|
||||
{
|
||||
Gimp *gimp = gimp_dialog_factory_get_context (factory)->gimp;
|
||||
|
@@ -124,7 +124,7 @@ fade_dialog_new (GimpImage *image,
|
||||
|
||||
g_free (title);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -202,8 +202,7 @@ file_open_dialog_open_image (GtkWidget *dialog,
|
||||
GIMP_PROGRESS (dialog),
|
||||
file, file, FALSE,
|
||||
load_proc,
|
||||
G_OBJECT (gtk_widget_get_screen (dialog)),
|
||||
gimp_widget_get_monitor (dialog),
|
||||
G_OBJECT (gimp_widget_get_monitor (dialog)),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
|
@@ -82,7 +82,7 @@ file_open_location_dialog_new (Gimp *gimp)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG(dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG(dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -208,8 +208,7 @@ file_open_location_response (GtkDialog *dialog,
|
||||
GIMP_PROGRESS (box),
|
||||
file, entered_file,
|
||||
FALSE, NULL,
|
||||
G_OBJECT (gtk_widget_get_screen (entry)),
|
||||
gimp_widget_get_monitor (entry),
|
||||
G_OBJECT (gimp_widget_get_monitor (entry)),
|
||||
&status, &error);
|
||||
|
||||
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);
|
||||
|
@@ -716,7 +716,7 @@ file_save_dialog_use_extension (GtkWidget *save_dialog,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -117,7 +117,7 @@ fill_dialog_new (GimpItem *item,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
|
@@ -104,7 +104,7 @@ grid_dialog_new (GimpImage *image,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GRID_RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
|
@@ -102,7 +102,7 @@ image_merge_layers_dialog_new (GimpImage *image,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -108,7 +108,7 @@ image_new_dialog_new (GimpContext *context)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
@@ -327,7 +327,7 @@ image_new_confirm_dialog (ImageNewDialog *private)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (private->confirm_dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (private->confirm_dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -368,8 +368,7 @@ image_new_create_image (ImageNewDialog *private)
|
||||
image = gimp_image_new_from_template (gimp, template,
|
||||
gimp_get_user_context (gimp));
|
||||
gimp_create_display (gimp, image, gimp_template_get_unit (template), 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (private->dialog)),
|
||||
gimp_widget_get_monitor (private->dialog));
|
||||
G_OBJECT (gimp_widget_get_monitor (private->dialog)));
|
||||
g_object_unref (image);
|
||||
|
||||
gtk_widget_destroy (private->dialog);
|
||||
|
@@ -212,7 +212,7 @@ image_scale_confirm_dialog (ImageScaleDialog *private)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (widget),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (widget),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -64,7 +64,7 @@ input_devices_dialog_new (Gimp *gimp)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CLOSE,
|
||||
-1);
|
||||
|
@@ -56,8 +56,8 @@ struct _ItemOptionsDialog
|
||||
gpointer user_data;
|
||||
|
||||
GtkWidget *left_vbox;
|
||||
GtkWidget *left_table;
|
||||
gint table_row;
|
||||
GtkWidget *left_grid;
|
||||
gint grid_row;
|
||||
GtkWidget *name_entry;
|
||||
GtkWidget *right_frame;
|
||||
GtkWidget *right_vbox;
|
||||
@@ -105,7 +105,7 @@ item_options_dialog_new (GimpImage *image,
|
||||
GtkWidget *dialog;
|
||||
GimpViewable *viewable;
|
||||
GtkWidget *main_hbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *button;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
@@ -147,7 +147,7 @@ item_options_dialog_new (GimpImage *image,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -171,11 +171,11 @@ item_options_dialog_new (GimpImage *image,
|
||||
gtk_box_pack_start (GTK_BOX (main_hbox), private->left_vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (private->left_vbox);
|
||||
|
||||
private->left_table = table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||
gtk_box_pack_start (GTK_BOX (private->left_vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
private->left_grid = grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
|
||||
gtk_box_pack_start (GTK_BOX (private->left_vbox), grid, FALSE, FALSE, 0);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
/* The name label and entry */
|
||||
if (name_label)
|
||||
@@ -189,14 +189,14 @@ item_options_dialog_new (GimpImage *image,
|
||||
private->name_entry = gtk_entry_new ();
|
||||
gtk_entry_set_activates_default (GTK_ENTRY (private->name_entry), TRUE);
|
||||
gtk_entry_set_text (GTK_ENTRY (private->name_entry), item_name);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, private->table_row++,
|
||||
name_label, 0.0, 0.5,
|
||||
private->name_entry, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, private->grid_row++,
|
||||
name_label, 0.0, 0.5,
|
||||
private->name_entry, 1);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, private->table_row++,
|
||||
_("Color tag:"), 0.0, 0.5,
|
||||
hbox, 1, TRUE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, private->grid_row++,
|
||||
_("Color tag:"), 0.0, 0.5,
|
||||
hbox, 1);
|
||||
|
||||
radio_box = gimp_enum_radio_box_new (GIMP_TYPE_COLOR_TAG,
|
||||
G_CALLBACK (gimp_radio_button_update),
|
||||
@@ -230,14 +230,12 @@ item_options_dialog_new (GimpImage *image,
|
||||
|
||||
if (gimp_get_color_tag_color (color_tag, &color, FALSE))
|
||||
{
|
||||
GtkSettings *settings = gtk_widget_get_settings (dialog);
|
||||
gint w, h;
|
||||
gint w, h;
|
||||
|
||||
image = gimp_color_area_new (&color, GIMP_COLOR_AREA_FLAT, 0);
|
||||
gimp_color_area_set_color_config (GIMP_COLOR_AREA (image),
|
||||
context->gimp->config->color_management);
|
||||
gtk_icon_size_lookup_for_settings (settings,
|
||||
GTK_ICON_SIZE_MENU, &w, &h);
|
||||
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
|
||||
gtk_widget_set_size_request (image, w, h);
|
||||
}
|
||||
else
|
||||
@@ -322,8 +320,8 @@ item_options_dialog_get_vbox (GtkWidget *dialog)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
item_options_dialog_get_table (GtkWidget *dialog,
|
||||
gint *next_row)
|
||||
item_options_dialog_get_grid (GtkWidget *dialog,
|
||||
gint *next_row)
|
||||
{
|
||||
ItemOptionsDialog *private;
|
||||
|
||||
@@ -335,9 +333,9 @@ item_options_dialog_get_table (GtkWidget *dialog,
|
||||
|
||||
g_return_val_if_fail (private != NULL, NULL);
|
||||
|
||||
*next_row = private->table_row;
|
||||
*next_row = private->grid_row;
|
||||
|
||||
return private->left_table;
|
||||
return private->left_grid;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -385,10 +383,10 @@ item_options_dialog_add_widget (GtkWidget *dialog,
|
||||
|
||||
g_return_if_fail (private != NULL);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (private->left_table),
|
||||
0, private->table_row++,
|
||||
label, 0.0, 0.5,
|
||||
widget, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (private->left_grid),
|
||||
0, private->grid_row++,
|
||||
label, 0.0, 0.5,
|
||||
widget, 1);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@@ -55,7 +55,7 @@ GtkWidget * item_options_dialog_new (GimpImage *image,
|
||||
gpointer user_data);
|
||||
|
||||
GtkWidget * item_options_dialog_get_vbox (GtkWidget *dialog);
|
||||
GtkWidget * item_options_dialog_get_table (GtkWidget *dialog,
|
||||
GtkWidget * item_options_dialog_get_grid (GtkWidget *dialog,
|
||||
gint *next_row);
|
||||
GtkWidget * item_options_dialog_get_name_entry (GtkWidget *dialog);
|
||||
GtkWidget * item_options_dialog_get_lock_position (GtkWidget *dialog);
|
||||
|
@@ -112,7 +112,7 @@ layer_add_mask_dialog_new (GimpLayer *layer,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -125,7 +125,7 @@ layer_options_dialog_new (GimpImage *image,
|
||||
{
|
||||
LayerOptionsDialog *private;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkListStore *space_model;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *scale;
|
||||
@@ -242,7 +242,7 @@ layer_options_dialog_new (GimpImage *image,
|
||||
G_CALLBACK (gimp_double_adjustment_update),
|
||||
&private->opacity);
|
||||
|
||||
table = item_options_dialog_get_table (dialog, &row);
|
||||
grid = item_options_dialog_get_grid (dialog, &row);
|
||||
|
||||
gimp_image_get_resolution (image, &xres, &yres);
|
||||
|
||||
@@ -251,14 +251,12 @@ layer_options_dialog_new (GimpImage *image,
|
||||
/* The size labels */
|
||||
label = gtk_label_new (_("Width:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, row, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new (_("Height:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row + 1, row + 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, row + 1, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
/* The size sizeentry */
|
||||
@@ -271,17 +269,13 @@ layer_options_dialog_new (GimpImage *image,
|
||||
private->size_se = gimp_size_entry_new (1, GIMP_UNIT_PIXEL, "%a",
|
||||
TRUE, TRUE, FALSE, 10,
|
||||
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (private->size_se), 1, 4);
|
||||
gtk_table_set_row_spacing (GTK_TABLE (private->size_se), 0, 2);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (private->size_se),
|
||||
GTK_SPIN_BUTTON (spinbutton), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (private->size_se), spinbutton,
|
||||
1, 2, 0, 1);
|
||||
gtk_grid_attach (GTK_GRID (private->size_se), spinbutton, 1, 0, 1, 1);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table), private->size_se, 1, 2, row, row + 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->size_se, 1, row, 1, 2);
|
||||
gtk_widget_show (private->size_se);
|
||||
|
||||
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (private->size_se),
|
||||
@@ -315,14 +309,12 @@ layer_options_dialog_new (GimpImage *image,
|
||||
/* The offset labels */
|
||||
label = gtk_label_new (_("Offset X:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, row, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new (_("Offset Y:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row + 1, row + 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, row + 1, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
/* The offset sizeentry */
|
||||
@@ -335,17 +327,13 @@ layer_options_dialog_new (GimpImage *image,
|
||||
private->offset_se = gimp_size_entry_new (1, GIMP_UNIT_PIXEL, "%a",
|
||||
TRUE, TRUE, FALSE, 10,
|
||||
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (private->offset_se), 1, 4);
|
||||
gtk_table_set_row_spacing (GTK_TABLE (private->offset_se), 0, 2);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (private->offset_se),
|
||||
GTK_SPIN_BUTTON (spinbutton), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (private->offset_se), spinbutton,
|
||||
1, 2, 0, 1);
|
||||
gtk_grid_attach (GTK_GRID (private->offset_se), spinbutton, 1, 0, 1, 1);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table), private->offset_se, 1, 2, row, row + 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->offset_se, 1, row, 1, 2);
|
||||
gtk_widget_show (private->offset_se);
|
||||
|
||||
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (private->offset_se),
|
||||
@@ -383,18 +371,13 @@ layer_options_dialog_new (GimpImage *image,
|
||||
|
||||
row += 2;
|
||||
|
||||
/* set the spacings after adding widgets or GtkTable will warn */
|
||||
gtk_table_set_row_spacing (GTK_TABLE (table), 3, 4);
|
||||
if (! layer)
|
||||
gtk_table_set_row_spacing (GTK_TABLE (table), 5, 4);
|
||||
|
||||
if (! layer)
|
||||
{
|
||||
/* The fill type */
|
||||
combo = gimp_enum_combo_box_new (GIMP_TYPE_FILL_TYPE);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
|
||||
_("_Fill with:"), 0.0, 0.5,
|
||||
combo, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, row++,
|
||||
_("_Fill with:"), 0.0, 0.5,
|
||||
combo, 1);
|
||||
gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo),
|
||||
private->fill_type,
|
||||
G_CALLBACK (gimp_int_combo_box_get_active),
|
||||
|
@@ -160,7 +160,7 @@ inv_show_status (void)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
inv_draw (gpointer data)
|
||||
inv_queue_draw_idle (gpointer data)
|
||||
{
|
||||
gtk_widget_queue_draw (data);
|
||||
|
||||
@@ -171,7 +171,7 @@ static void
|
||||
inv_queue_draw (GtkWidget *window)
|
||||
{
|
||||
if (inv_draw_idle == 0)
|
||||
inv_draw_idle = g_idle_add (inv_draw, window);
|
||||
inv_draw_idle = g_idle_add (inv_queue_draw_idle, window);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -190,7 +190,7 @@ inv_draw_explosion (int x, int y)
|
||||
for (i = 5; i < 100; i += 5) {
|
||||
cairo_arc (cr, x, y, i, 0, 2 * G_PI);
|
||||
cairo_fill (cr);
|
||||
gdk_flush ();
|
||||
gdk_display_flush (gtk_widget_get_display (geginv_canvas));
|
||||
g_usleep (50000);
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ inv_draw_explosion (int x, int y)
|
||||
for (i = 5; i < 100; i += 5) {
|
||||
cairo_arc (cr, x, y, i, 0, 2 * G_PI);
|
||||
cairo_fill (cr);
|
||||
gdk_flush ();
|
||||
gdk_display_flush (gtk_widget_get_display (geginv_canvas));
|
||||
g_usleep (50000);
|
||||
}
|
||||
|
||||
@@ -681,9 +681,8 @@ geginv_destroyed (GtkWidget *w, gpointer data)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
inv_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||
inv_draw (GtkWidget *widget, cairo_t *cr)
|
||||
{
|
||||
cairo_t *cr;
|
||||
GdkPixbuf *goat;
|
||||
GSList *li;
|
||||
int i, j;
|
||||
@@ -693,11 +692,6 @@ inv_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ( ! gtk_widget_is_drawable (geginv_canvas))
|
||||
return TRUE;
|
||||
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (geginv_canvas));
|
||||
|
||||
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
|
||||
cairo_paint (cr);
|
||||
|
||||
@@ -755,10 +749,6 @@ inv_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
gdk_flush ();
|
||||
|
||||
if (inv_do_pause) {
|
||||
g_usleep (G_USEC_PER_SEC);
|
||||
inv_do_pause = FALSE;
|
||||
@@ -773,6 +763,8 @@ gboolean gimp_lebl_dialog (void);
|
||||
gboolean
|
||||
gimp_lebl_dialog (void)
|
||||
{
|
||||
GdkMonitor *monitor;
|
||||
GdkRectangle workarea;
|
||||
GtkWidget *vbox;
|
||||
int i, j;
|
||||
|
||||
@@ -784,13 +776,16 @@ gimp_lebl_dialog (void)
|
||||
inv_width = 800;
|
||||
inv_height = 600;
|
||||
|
||||
if (inv_width > gdk_screen_get_width (gdk_screen_get_default ()) * 0.9) {
|
||||
inv_width = gdk_screen_get_width (gdk_screen_get_default ()) * 0.9;
|
||||
monitor = gimp_get_monitor_at_pointer ();
|
||||
gdk_monitor_get_workarea (monitor, &workarea);
|
||||
|
||||
if (inv_width > workarea.width * 0.9) {
|
||||
inv_width = workarea.width * 0.9;
|
||||
inv_height = inv_width * (600.0/800.0);
|
||||
}
|
||||
|
||||
if (inv_height > gdk_screen_get_height (gdk_screen_get_default ()) * 0.9) {
|
||||
inv_height = gdk_screen_get_height (gdk_screen_get_default ()) * 0.9;
|
||||
if (inv_height > workarea.height * 0.9) {
|
||||
inv_height = workarea.height * 0.9;
|
||||
inv_width = inv_height * (800.0/600.0);
|
||||
}
|
||||
|
||||
@@ -840,8 +835,8 @@ gimp_lebl_dialog (void)
|
||||
G_CALLBACK (inv_key_press), NULL);
|
||||
g_signal_connect (G_OBJECT (geginv), "key_release_event",
|
||||
G_CALLBACK (inv_key_release), NULL);
|
||||
g_signal_connect (G_OBJECT (geginv_canvas), "expose_event",
|
||||
G_CALLBACK (inv_expose), NULL);
|
||||
g_signal_connect (G_OBJECT (geginv_canvas), "draw",
|
||||
G_CALLBACK (inv_draw), NULL);
|
||||
|
||||
g_slist_foreach (inv_shots, (GFunc)g_free, NULL);
|
||||
g_slist_free (inv_shots);
|
||||
|
@@ -70,7 +70,7 @@ struct _ModuleDialog
|
||||
GtkListStore *list;
|
||||
|
||||
GtkWidget *hint;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *label[N_INFOS];
|
||||
GtkWidget *error_box;
|
||||
GtkWidget *error_label;
|
||||
@@ -101,7 +101,7 @@ static void dialog_info_update (GimpModuleDB *db,
|
||||
GimpModule *module,
|
||||
ModuleDialog *private);
|
||||
static void dialog_info_init (ModuleDialog *private,
|
||||
GtkWidget *table);
|
||||
GtkWidget *grid);
|
||||
|
||||
|
||||
/* public functions */
|
||||
@@ -135,7 +135,7 @@ module_dialog_new (Gimp *gimp)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_CLOSE,
|
||||
RESPONSE_REFRESH,
|
||||
-1);
|
||||
@@ -176,7 +176,8 @@ module_dialog_new (Gimp *gimp)
|
||||
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
|
||||
|
||||
g_list_foreach (gimp->module_db->modules, make_list_item, private);
|
||||
g_list_foreach (gimp_module_db_get_modules (gimp->module_db),
|
||||
make_list_item, private);
|
||||
|
||||
rend = gtk_cell_renderer_toggle_new ();
|
||||
|
||||
@@ -199,10 +200,10 @@ module_dialog_new (Gimp *gimp)
|
||||
gtk_container_add (GTK_CONTAINER (sw), view);
|
||||
gtk_widget_show (view);
|
||||
|
||||
private->table = gtk_table_new (2, N_INFOS, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (private->table), 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), private->table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (private->table);
|
||||
private->grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (private->grid), 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), private->grid, FALSE, FALSE, 0);
|
||||
gtk_widget_show (private->grid);
|
||||
|
||||
private->error_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), private->error_box, FALSE, FALSE, 0);
|
||||
@@ -218,7 +219,7 @@ module_dialog_new (Gimp *gimp)
|
||||
private->error_label, TRUE, TRUE, 0);
|
||||
gtk_widget_show (private->error_label);
|
||||
|
||||
dialog_info_init (private, private->table);
|
||||
dialog_info_init (private, private->grid);
|
||||
|
||||
dialog_info_update (gimp->module_db, private->selected, private);
|
||||
|
||||
@@ -492,7 +493,7 @@ dialog_info_update (GimpModuleDB *db,
|
||||
|
||||
static void
|
||||
dialog_info_init (ModuleDialog *private,
|
||||
GtkWidget *table)
|
||||
GtkWidget *grid)
|
||||
{
|
||||
GtkWidget *label;
|
||||
gint i;
|
||||
@@ -510,17 +511,14 @@ dialog_info_init (ModuleDialog *private,
|
||||
{
|
||||
label = gtk_label_new (gettext (text[i]));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, i, i + 1,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 2);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
private->label[i] = gtk_label_new ("");
|
||||
gtk_label_set_xalign (GTK_LABEL (private->label[i]), 0.0);
|
||||
gtk_label_set_ellipsize (GTK_LABEL (private->label[i]),
|
||||
PANGO_ELLIPSIZE_END);
|
||||
gtk_table_attach (GTK_TABLE (private->table), private->label[i],
|
||||
1, 2, i, i + 1,
|
||||
GTK_EXPAND | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 2);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->label[i], 1, i, 1, 1);
|
||||
gtk_widget_show (private->label[i]);
|
||||
}
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@ offset_dialog_new (GimpDrawable *drawable,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -178,14 +178,9 @@ offset_dialog_new (GimpDrawable *drawable,
|
||||
TRUE, TRUE, FALSE, 10,
|
||||
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
||||
|
||||
gtk_table_set_col_spacing (GTK_TABLE (private->off_se), 0, 4);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (private->off_se), 1, 4);
|
||||
gtk_table_set_row_spacing (GTK_TABLE (private->off_se), 0, 2);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (private->off_se),
|
||||
GTK_SPIN_BUTTON (spinbutton), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (private->off_se), spinbutton,
|
||||
1, 2, 0, 1);
|
||||
gtk_grid_attach (GTK_GRID (private->off_se), spinbutton, 1, 0, 1, 1);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (private->off_se),
|
||||
|
@@ -138,8 +138,7 @@ palette_import_dialog_new (GimpContext *context)
|
||||
GtkWidget *main_hbox;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *abox;
|
||||
GtkWidget *grid;
|
||||
GtkSizeGroup *size_group;
|
||||
GSList *group = NULL;
|
||||
|
||||
@@ -164,7 +163,7 @@ palette_import_dialog_new (GimpContext *context)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -202,17 +201,16 @@ palette_import_dialog_new (GimpContext *context)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
table = gtk_table_new (5, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
private->gradient_radio =
|
||||
gtk_radio_button_new_with_mnemonic (group, _("_Gradient"));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (private->gradient_radio));
|
||||
gtk_table_attach (GTK_TABLE (table), private->gradient_radio,
|
||||
0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->gradient_radio, 0, 0, 1, 1);
|
||||
gtk_widget_show (private->gradient_radio);
|
||||
|
||||
g_signal_connect (private->gradient_radio, "toggled",
|
||||
@@ -222,8 +220,7 @@ palette_import_dialog_new (GimpContext *context)
|
||||
private->image_radio =
|
||||
gtk_radio_button_new_with_mnemonic (group, _("I_mage"));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (private->image_radio));
|
||||
gtk_table_attach (GTK_TABLE (table), private->image_radio,
|
||||
0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->image_radio, 0, 1, 1, 1);
|
||||
gtk_widget_show (private->image_radio);
|
||||
|
||||
g_signal_connect (private->image_radio, "toggled",
|
||||
@@ -237,8 +234,7 @@ palette_import_dialog_new (GimpContext *context)
|
||||
gtk_check_button_new_with_mnemonic (_("Sample _Merged"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (private->sample_merged_toggle),
|
||||
TRUE);
|
||||
gtk_table_attach (GTK_TABLE (table), private->sample_merged_toggle,
|
||||
1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->sample_merged_toggle, 1, 2, 1, 1);
|
||||
gtk_widget_show (private->sample_merged_toggle);
|
||||
|
||||
g_signal_connect_swapped (private->sample_merged_toggle, "toggled",
|
||||
@@ -249,8 +245,7 @@ palette_import_dialog_new (GimpContext *context)
|
||||
gtk_check_button_new_with_mnemonic (_("_Selected Pixels only"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (private->selection_only_toggle),
|
||||
FALSE);
|
||||
gtk_table_attach (GTK_TABLE (table), private->selection_only_toggle,
|
||||
1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->selection_only_toggle, 1, 3, 1, 1);
|
||||
gtk_widget_show (private->selection_only_toggle);
|
||||
|
||||
g_signal_connect_swapped (private->selection_only_toggle, "toggled",
|
||||
@@ -260,8 +255,7 @@ palette_import_dialog_new (GimpContext *context)
|
||||
private->file_radio =
|
||||
gtk_radio_button_new_with_mnemonic (group, _("Palette _file"));
|
||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (private->image_radio));
|
||||
gtk_table_attach (GTK_TABLE (table), private->file_radio,
|
||||
0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), private->file_radio, 0, 4, 1, 1);
|
||||
gtk_widget_show (private->file_radio);
|
||||
|
||||
g_signal_connect (private->file_radio, "toggled",
|
||||
@@ -274,23 +268,23 @@ palette_import_dialog_new (GimpContext *context)
|
||||
private->gradient_combo =
|
||||
gimp_container_combo_box_new (gimp_data_factory_get_container (context->gimp->gradient_factory),
|
||||
private->context, 24, 1);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
NULL, 0.0, 0.5, private->gradient_combo, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||
NULL, 0.0, 0.5, private->gradient_combo, 1);
|
||||
gtk_size_group_add_widget (size_group, private->gradient_combo);
|
||||
|
||||
/* The image menu */
|
||||
private->image_combo =
|
||||
gimp_container_combo_box_new (context->gimp->images, private->context,
|
||||
24, 1);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
NULL, 0.0, 0.5, private->image_combo, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
|
||||
NULL, 0.0, 0.5, private->image_combo, 1);
|
||||
gtk_size_group_add_widget (size_group, private->image_combo);
|
||||
|
||||
/* Palette file name entry */
|
||||
private->file_chooser = gtk_file_chooser_button_new (_("Select Palette File"),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
|
||||
NULL, 0.0, 0.5, private->file_chooser, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 4,
|
||||
NULL, 0.0, 0.5, private->file_chooser, 1);
|
||||
gtk_size_group_add_widget (size_group, private->file_chooser);
|
||||
|
||||
g_object_unref (size_group);
|
||||
@@ -302,29 +296,28 @@ palette_import_dialog_new (GimpContext *context)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
table = gtk_table_new (4, 3, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
/* The source's name */
|
||||
private->entry = gtk_entry_new ();
|
||||
gtk_entry_set_text (GTK_ENTRY (private->entry),
|
||||
gradient ?
|
||||
gimp_object_get_name (gradient) : _("New import"));
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Palette _name:"), 0.0, 0.5,
|
||||
private->entry, 2, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||
_("Palette _name:"), 0.0, 0.5,
|
||||
private->entry, 2);
|
||||
|
||||
/* The # of colors */
|
||||
private->num_colors =
|
||||
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
_("N_umber of colors:"), -1, 5,
|
||||
256, 2, 10000, 1, 10, 0,
|
||||
TRUE, 0.0, 0.0,
|
||||
NULL, NULL));
|
||||
gimp_scale_entry_set_logarithmic (GTK_OBJECT (private->num_colors), TRUE);
|
||||
private->num_colors = gimp_scale_entry_new (GTK_GRID (grid), 0, 1,
|
||||
_("N_umber of colors:"), -1, 5,
|
||||
256, 2, 10000, 1, 10, 0,
|
||||
TRUE, 0.0, 0.0,
|
||||
NULL, NULL);
|
||||
gimp_scale_entry_set_logarithmic (private->num_colors, TRUE);
|
||||
|
||||
g_signal_connect_swapped (private->num_colors,
|
||||
"value-changed",
|
||||
@@ -332,24 +325,22 @@ palette_import_dialog_new (GimpContext *context)
|
||||
private);
|
||||
|
||||
/* The columns */
|
||||
private->columns =
|
||||
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
|
||||
_("C_olumns:"), -1, 5,
|
||||
16, 0, 64, 1, 8, 0,
|
||||
TRUE, 0.0, 0.0,
|
||||
NULL, NULL));
|
||||
private->columns = gimp_scale_entry_new (GTK_GRID (grid), 0, 2,
|
||||
_("C_olumns:"), -1, 5,
|
||||
16, 0, 64, 1, 8, 0,
|
||||
TRUE, 0.0, 0.0,
|
||||
NULL, NULL);
|
||||
|
||||
g_signal_connect (private->columns, "value-changed",
|
||||
G_CALLBACK (palette_import_columns_changed),
|
||||
private);
|
||||
|
||||
/* The interval */
|
||||
private->threshold =
|
||||
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
|
||||
_("I_nterval:"), -1, 5,
|
||||
1, 1, 128, 1, 8, 0,
|
||||
TRUE, 0.0, 0.0,
|
||||
NULL, NULL));
|
||||
private->threshold = gimp_scale_entry_new (GTK_GRID (grid), 0, 3,
|
||||
_("I_nterval:"), -1, 5,
|
||||
1, 1, 128, 1, 8, 0,
|
||||
TRUE, 0.0, 0.0,
|
||||
NULL, NULL);
|
||||
|
||||
g_signal_connect_swapped (private->threshold, "value-changed",
|
||||
G_CALLBACK (palette_import_make_palette),
|
||||
@@ -365,16 +356,13 @@ palette_import_dialog_new (GimpContext *context)
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
abox = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), abox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (abox);
|
||||
|
||||
private->preview = gimp_view_new_full_by_types (private->context,
|
||||
GIMP_TYPE_VIEW,
|
||||
GIMP_TYPE_PALETTE,
|
||||
192, 192, 1,
|
||||
TRUE, FALSE, FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (abox), private->preview);
|
||||
gtk_widget_set_halign (private->preview, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), private->preview, FALSE, FALSE, 0);
|
||||
gtk_widget_show (private->preview);
|
||||
|
||||
private->no_colors_label =
|
||||
@@ -528,10 +516,8 @@ palette_import_image_changed (GimpContext *context,
|
||||
|
||||
gtk_widget_set_sensitive (private->sample_merged_toggle, sensitive);
|
||||
gtk_widget_set_sensitive (private->selection_only_toggle, sensitive);
|
||||
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->threshold),
|
||||
sensitive);
|
||||
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->num_colors),
|
||||
sensitive);
|
||||
gimp_scale_entry_set_sensitive (private->threshold, sensitive);
|
||||
gimp_scale_entry_set_sensitive (private->num_colors, sensitive);
|
||||
}
|
||||
|
||||
if (private->image)
|
||||
@@ -641,9 +627,9 @@ palette_import_set_sensitive (ImportDialog *private)
|
||||
gtk_widget_set_sensitive (private->selection_only_toggle, image);
|
||||
gtk_widget_set_sensitive (private->file_chooser, file);
|
||||
|
||||
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->num_colors), ! file);
|
||||
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->columns), ! file);
|
||||
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->threshold), image);
|
||||
gimp_scale_entry_set_sensitive (private->num_colors, ! file);
|
||||
gimp_scale_entry_set_sensitive (private->columns, ! file);
|
||||
gimp_scale_entry_set_sensitive (private->threshold, image);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -57,24 +57,23 @@ prefs_frame_new (const gchar *label,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
prefs_table_new (gint rows,
|
||||
GtkContainer *parent)
|
||||
prefs_grid_new (GtkContainer *parent)
|
||||
{
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
|
||||
table = gtk_table_new (rows, 2, FALSE);
|
||||
grid = gtk_grid_new ();
|
||||
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
|
||||
|
||||
if (GTK_IS_BOX (parent))
|
||||
gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (parent), grid, FALSE, FALSE, 0);
|
||||
else
|
||||
gtk_container_add (parent, table);
|
||||
gtk_container_add (parent, grid);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
return table;
|
||||
return grid;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -160,7 +159,12 @@ prefs_check_button_add_with_icon (GObject *config,
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
|
||||
gtk_misc_set_padding (GTK_MISC (image), 2, 2);
|
||||
g_object_set (image,
|
||||
"margin-start", 2,
|
||||
"margin-end", 2,
|
||||
"margin-top", 2,
|
||||
"margin-bottom", 2,
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
|
||||
@@ -176,17 +180,20 @@ prefs_check_button_add_with_icon (GObject *config,
|
||||
GtkWidget *
|
||||
prefs_widget_add_aligned (GtkWidget *widget,
|
||||
const gchar *text,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
gboolean left_align,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
GtkWidget *label = gimp_table_attach_aligned (table, 0, table_row,
|
||||
text, 0.0, 0.5,
|
||||
widget, 1, left_align);
|
||||
GtkWidget *label = gimp_grid_attach_aligned (grid, 0, grid_top,
|
||||
text, 0.0, 0.5,
|
||||
widget, 1);
|
||||
if (group)
|
||||
gtk_size_group_add_widget (group, label);
|
||||
|
||||
if (left_align == TRUE)
|
||||
gtk_widget_set_halign (widget, GTK_ALIGN_START);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
@@ -195,8 +202,8 @@ prefs_color_button_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
const gchar *title,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group,
|
||||
GimpContext *context)
|
||||
{
|
||||
@@ -222,7 +229,7 @@ prefs_color_button_add (GObject *config,
|
||||
if (context)
|
||||
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button), context);
|
||||
|
||||
prefs_widget_add_aligned (button, label, table, table_row, TRUE, group);
|
||||
prefs_widget_add_aligned (button, label, grid, grid_top, TRUE, group);
|
||||
}
|
||||
|
||||
return button;
|
||||
@@ -232,14 +239,14 @@ GtkWidget *
|
||||
prefs_entry_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
GtkWidget *entry = gimp_prop_entry_new (config, property_name, -1);
|
||||
|
||||
if (entry)
|
||||
prefs_widget_add_aligned (entry, label, table, table_row, FALSE, group);
|
||||
prefs_widget_add_aligned (entry, label, grid, grid_top, FALSE, group);
|
||||
|
||||
return entry;
|
||||
}
|
||||
@@ -251,8 +258,8 @@ prefs_spin_button_add (GObject *config,
|
||||
gdouble page_increment,
|
||||
gint digits,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
GtkWidget *button = gimp_prop_spin_button_new (config, property_name,
|
||||
@@ -261,7 +268,7 @@ prefs_spin_button_add (GObject *config,
|
||||
digits);
|
||||
|
||||
if (button)
|
||||
prefs_widget_add_aligned (button, label, table, table_row, TRUE, group);
|
||||
prefs_widget_add_aligned (button, label, grid, grid_top, TRUE, group);
|
||||
|
||||
return button;
|
||||
}
|
||||
@@ -270,14 +277,14 @@ GtkWidget *
|
||||
prefs_memsize_entry_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
GtkWidget *entry = gimp_prop_memsize_entry_new (config, property_name);
|
||||
|
||||
if (entry)
|
||||
prefs_widget_add_aligned (entry, label, table, table_row, TRUE, group);
|
||||
prefs_widget_add_aligned (entry, label, grid, grid_top, TRUE, group);
|
||||
|
||||
return entry;
|
||||
}
|
||||
@@ -287,8 +294,8 @@ prefs_file_chooser_button_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
const gchar *dialog_title,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
GtkWidget *button;
|
||||
@@ -298,7 +305,7 @@ prefs_file_chooser_button_add (GObject *config,
|
||||
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
|
||||
if (button)
|
||||
prefs_widget_add_aligned (button, label, table, table_row, FALSE, group);
|
||||
prefs_widget_add_aligned (button, label, grid, grid_top, FALSE, group);
|
||||
|
||||
return button;
|
||||
}
|
||||
@@ -309,15 +316,15 @@ prefs_enum_combo_box_add (GObject *config,
|
||||
gint minimum,
|
||||
gint maximum,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
GtkWidget *combo = gimp_prop_enum_combo_box_new (config, property_name,
|
||||
minimum, maximum);
|
||||
|
||||
if (combo)
|
||||
prefs_widget_add_aligned (combo, label, table, table_row, FALSE, group);
|
||||
prefs_widget_add_aligned (combo, label, grid, grid_top, FALSE, group);
|
||||
|
||||
return combo;
|
||||
}
|
||||
@@ -328,15 +335,15 @@ prefs_boolean_combo_box_add (GObject *config,
|
||||
const gchar *true_text,
|
||||
const gchar *false_text,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group)
|
||||
{
|
||||
GtkWidget *combo = gimp_prop_boolean_combo_box_new (config, property_name,
|
||||
true_text, false_text);
|
||||
|
||||
if (combo)
|
||||
prefs_widget_add_aligned (combo, label, table, table_row, FALSE, group);
|
||||
prefs_widget_add_aligned (combo, label, grid, grid_top, FALSE, group);
|
||||
|
||||
return combo;
|
||||
}
|
||||
@@ -365,8 +372,8 @@ prefs_profile_combo_box_add (GObject *config,
|
||||
GtkListStore *profile_store,
|
||||
const gchar *dialog_title,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group,
|
||||
GObject *profile_path_config,
|
||||
const gchar *profile_path_property_name)
|
||||
@@ -379,7 +386,7 @@ prefs_profile_combo_box_add (GObject *config,
|
||||
profile_path_property_name);
|
||||
|
||||
if (combo)
|
||||
prefs_widget_add_aligned (combo, label, table, table_row, FALSE, group);
|
||||
prefs_widget_add_aligned (combo, label, grid, grid_top, FALSE, group);
|
||||
|
||||
return combo;
|
||||
}
|
||||
|
@@ -26,8 +26,7 @@
|
||||
GtkWidget * prefs_frame_new (const gchar *label,
|
||||
GtkContainer *parent,
|
||||
gboolean expand);
|
||||
GtkWidget * prefs_table_new (gint rows,
|
||||
GtkContainer *parent);
|
||||
GtkWidget * prefs_grid_new (GtkContainer *parent);
|
||||
|
||||
GtkWidget * prefs_hint_box_new (const gchar *icon_name,
|
||||
const gchar *text);
|
||||
@@ -48,8 +47,8 @@ GtkWidget * prefs_check_button_add_with_icon (GObject *config,
|
||||
|
||||
GtkWidget * prefs_widget_add_aligned (GtkWidget *widget,
|
||||
const gchar *text,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
gboolean left_align,
|
||||
GtkSizeGroup *group);
|
||||
|
||||
@@ -57,16 +56,16 @@ GtkWidget * prefs_color_button_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
const gchar *title,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group,
|
||||
GimpContext *context);
|
||||
|
||||
GtkWidget * prefs_entry_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group);
|
||||
GtkWidget * prefs_spin_button_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
@@ -74,22 +73,22 @@ GtkWidget * prefs_spin_button_add (GObject *config,
|
||||
gdouble page_increment,
|
||||
gint digits,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group);
|
||||
GtkWidget * prefs_memsize_entry_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group);
|
||||
|
||||
GtkWidget * prefs_file_chooser_button_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *label,
|
||||
const gchar *dialog_title,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group);
|
||||
|
||||
GtkWidget * prefs_enum_combo_box_add (GObject *config,
|
||||
@@ -97,16 +96,16 @@ GtkWidget * prefs_enum_combo_box_add (GObject *config,
|
||||
gint minimum,
|
||||
gint maximum,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group);
|
||||
GtkWidget * prefs_boolean_combo_box_add (GObject *config,
|
||||
const gchar *property_name,
|
||||
const gchar *true_text,
|
||||
const gchar *false_text,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group);
|
||||
#ifdef HAVE_ISO_CODES
|
||||
GtkWidget * prefs_language_combo_box_add (GObject *config,
|
||||
@@ -118,8 +117,8 @@ GtkWidget * prefs_profile_combo_box_add (GObject *config,
|
||||
GtkListStore *profile_store,
|
||||
const gchar *dialog_title,
|
||||
const gchar *label,
|
||||
GtkTable *table,
|
||||
gint table_row,
|
||||
GtkGrid *grid,
|
||||
gint grid_top,
|
||||
GtkSizeGroup *group,
|
||||
GObject *profile_path_config,
|
||||
const gchar *profile_path_property_name);
|
||||
|
@@ -289,7 +289,7 @@ prefs_response (GtkWidget *widget,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (confirm),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (confirm),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -528,8 +528,7 @@ prefs_resolution_source_callback (GtkWidget *widget,
|
||||
|
||||
if (from_gdk)
|
||||
{
|
||||
gimp_get_monitor_resolution (gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
gimp_get_monitor_resolution (gimp_widget_get_monitor (widget),
|
||||
&xres, &yres);
|
||||
}
|
||||
else
|
||||
@@ -571,8 +570,8 @@ prefs_input_devices_dialog (GtkWidget *widget,
|
||||
Gimp *gimp)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
widget,
|
||||
"gimp-input-devices-dialog", 0);
|
||||
}
|
||||
|
||||
@@ -581,8 +580,8 @@ prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
|
||||
Gimp *gimp)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
widget,
|
||||
"gimp-keyboard-shortcuts-dialog", 0);
|
||||
}
|
||||
|
||||
@@ -639,7 +638,7 @@ prefs_menus_remove_callback (GtkWidget *widget,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -915,7 +914,7 @@ prefs_display_options_frame_add (Gimp *gimp,
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *checks_vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *button;
|
||||
|
||||
@@ -961,17 +960,17 @@ prefs_display_options_frame_add (Gimp *gimp,
|
||||
_("Show gri_d"),
|
||||
GTK_BOX (checks_vbox));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox));
|
||||
|
||||
combo = prefs_enum_combo_box_add (object, "padding-mode", 0, 0,
|
||||
_("Canvas _padding mode:"),
|
||||
GTK_TABLE (table), 0,
|
||||
GTK_GRID (grid), 0,
|
||||
NULL);
|
||||
|
||||
button = prefs_color_button_add (object, "padding-color",
|
||||
_("Custom p_adding color:"),
|
||||
_("Select Custom Canvas Padding Color"),
|
||||
GTK_TABLE (table), 1, NULL,
|
||||
GTK_GRID (grid), 1, NULL,
|
||||
gimp_get_user_context (gimp));
|
||||
|
||||
g_signal_connect (button, "color-changed",
|
||||
@@ -1066,7 +1065,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
GtkWidget *vbox3;
|
||||
GtkWidget *button;
|
||||
GtkWidget *button2;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry;
|
||||
GtkWidget *calibrate_button;
|
||||
@@ -1097,7 +1096,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
@@ -1133,29 +1132,25 @@ prefs_dialog_new (Gimp *gimp,
|
||||
vbox2 = prefs_frame_new (_("Resource Consumption"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
#ifdef ENABLE_MP
|
||||
table = prefs_table_new (5, GTK_CONTAINER (vbox2));
|
||||
#else
|
||||
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
|
||||
#endif /* ENABLE_MP */
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "undo-levels", 1.0, 5.0, 0,
|
||||
_("Minimal number of _undo levels:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
prefs_memsize_entry_add (object, "undo-size",
|
||||
_("Maximum undo _memory:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
prefs_memsize_entry_add (object, "tile-cache-size",
|
||||
_("Tile cache _size:"),
|
||||
GTK_TABLE (table), 2, size_group);
|
||||
GTK_GRID (grid), 2, size_group);
|
||||
prefs_memsize_entry_add (object, "max-new-image-size",
|
||||
_("Maximum _new image size:"),
|
||||
GTK_TABLE (table), 3, size_group);
|
||||
GTK_GRID (grid), 3, size_group);
|
||||
|
||||
#ifdef ENABLE_MP
|
||||
prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0,
|
||||
_("Number of _threads to use:"),
|
||||
GTK_TABLE (table), 4, size_group);
|
||||
GTK_GRID (grid), 4, size_group);
|
||||
#endif /* ENABLE_MP */
|
||||
|
||||
/* Hardware Acceleration */
|
||||
@@ -1169,15 +1164,15 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Image Thumbnails */
|
||||
vbox2 = prefs_frame_new (_("Image Thumbnails"), GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "thumbnail-size", 0, 0,
|
||||
_("Size of _thumbnails:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_memsize_entry_add (object, "thumbnail-filesize-limit",
|
||||
_("Maximum _filesize for thumbnailing:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
g_object_unref (size_group);
|
||||
size_group = NULL;
|
||||
@@ -1222,11 +1217,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
button = prefs_enum_combo_box_add (object, "debug-policy", 0, 0,
|
||||
_("Debug _policy:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Check existence of gdb or lldb to activate the preference, as a
|
||||
* good hint of its prerequisite, unless backtrace() API exists, in
|
||||
@@ -1284,17 +1279,17 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox));
|
||||
|
||||
prefs_enum_combo_box_add (color_config, "mode", 0, 0,
|
||||
_("Image display _mode:"),
|
||||
GTK_TABLE (table), row++, NULL);
|
||||
GTK_GRID (grid), row++, NULL);
|
||||
|
||||
/* Color Managed Display */
|
||||
vbox2 = prefs_frame_new (_("Color Managed Display"), GTK_CONTAINER (vbox),
|
||||
FALSE);
|
||||
|
||||
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
row = 0;
|
||||
|
||||
prefs_profile_combo_box_add (color_config,
|
||||
@@ -1302,28 +1297,26 @@ prefs_dialog_new (Gimp *gimp,
|
||||
store,
|
||||
_("Select Monitor Color Profile"),
|
||||
_("_Monitor profile:"),
|
||||
GTK_TABLE (table), row++, size_group,
|
||||
GTK_GRID (grid), row++, size_group,
|
||||
object, "color-profile-path");
|
||||
|
||||
button = gimp_prop_check_button_new (color_config,
|
||||
"display-profile-from-gdk",
|
||||
_("_Try to use the system monitor "
|
||||
"profile"));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table),
|
||||
button, 1, 2, row, row + 1);
|
||||
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
|
||||
gtk_widget_show (button);
|
||||
row++;
|
||||
|
||||
prefs_enum_combo_box_add (color_config,
|
||||
"display-rendering-intent", 0, 0,
|
||||
_("_Rendering intent:"),
|
||||
GTK_TABLE (table), row++, size_group);
|
||||
GTK_GRID (grid), row++, size_group);
|
||||
|
||||
button = gimp_prop_check_button_new (color_config,
|
||||
"display-use-black-point-compensation",
|
||||
_("Use _black point compensation"));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table),
|
||||
button, 1, 2, row, row + 1);
|
||||
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
|
||||
gtk_widget_show (button);
|
||||
row++;
|
||||
|
||||
@@ -1332,14 +1325,14 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("Speed"),
|
||||
_("Precision / Color Fidelity"),
|
||||
_("_Optimize image display for:"),
|
||||
GTK_TABLE (table), row++, size_group);
|
||||
GTK_GRID (grid), row++, size_group);
|
||||
|
||||
/* Print Simulation (Soft-proofing) */
|
||||
vbox2 = prefs_frame_new (_("Soft-Proofing"),
|
||||
GTK_CONTAINER (vbox),
|
||||
FALSE);
|
||||
|
||||
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
row = 0;
|
||||
|
||||
prefs_profile_combo_box_add (color_config,
|
||||
@@ -1347,19 +1340,18 @@ prefs_dialog_new (Gimp *gimp,
|
||||
store,
|
||||
_("Select Soft-Proofing Color Profile"),
|
||||
_("_Soft-proofing profile:"),
|
||||
GTK_TABLE (table), row++, size_group,
|
||||
GTK_GRID (grid), row++, size_group,
|
||||
object, "color-profile-path");
|
||||
|
||||
prefs_enum_combo_box_add (color_config,
|
||||
"simulation-rendering-intent", 0, 0,
|
||||
_("Re_ndering intent:"),
|
||||
GTK_TABLE (table), row++, size_group);
|
||||
GTK_GRID (grid), row++, size_group);
|
||||
|
||||
button = gimp_prop_check_button_new (color_config,
|
||||
"simulation-use-black-point-compensation",
|
||||
_("Use black _point compensation"));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table),
|
||||
button, 1, 2, row, row + 1);
|
||||
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
|
||||
gtk_widget_show (button);
|
||||
row++;
|
||||
|
||||
@@ -1368,10 +1360,10 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("Speed"),
|
||||
_("Precision / Color Fidelity"),
|
||||
_("O_ptimize soft-proofing for:"),
|
||||
GTK_TABLE (table), row++, size_group);
|
||||
GTK_GRID (grid), row++, size_group);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, row, row + 1);
|
||||
gtk_grid_attach (GTK_GRID (grid), hbox, 1, row, 1, 1);
|
||||
gtk_widget_show (hbox);
|
||||
row++;
|
||||
|
||||
@@ -1395,7 +1387,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
vbox2 = prefs_frame_new (_("Preferred Profiles"), GTK_CONTAINER (vbox),
|
||||
FALSE);
|
||||
|
||||
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
row = 0;
|
||||
|
||||
prefs_profile_combo_box_add (color_config,
|
||||
@@ -1403,7 +1395,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
store,
|
||||
_("Select Preferred RGB Color Profile"),
|
||||
_("_RGB profile:"),
|
||||
GTK_TABLE (table), row++, size_group,
|
||||
GTK_GRID (grid), row++, size_group,
|
||||
object, "color-profile-path");
|
||||
|
||||
prefs_profile_combo_box_add (color_config,
|
||||
@@ -1411,7 +1403,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
store,
|
||||
_("Select Preferred Grayscale Color Profile"),
|
||||
_("_Grayscale profile:"),
|
||||
GTK_TABLE (table), row++, size_group,
|
||||
GTK_GRID (grid), row++, size_group,
|
||||
object, "color-profile-path");
|
||||
|
||||
prefs_profile_combo_box_add (color_config,
|
||||
@@ -1419,17 +1411,17 @@ prefs_dialog_new (Gimp *gimp,
|
||||
store,
|
||||
_("Select CMYK Color Profile"),
|
||||
_("_CMYK profile:"),
|
||||
GTK_TABLE (table), row++, size_group,
|
||||
GTK_GRID (grid), row++, size_group,
|
||||
object, "color-profile-path");
|
||||
|
||||
/* Policies */
|
||||
vbox2 = prefs_frame_new (_("Policies"), GTK_CONTAINER (vbox),
|
||||
FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
||||
_("File Open behaviour:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Filter Dialogs */
|
||||
vbox2 = prefs_frame_new (_("Filter Dialogs"), GTK_CONTAINER (vbox),
|
||||
@@ -1475,10 +1467,10 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("Add an alpha channel to imported images"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
||||
_("Color profile policy:"),
|
||||
GTK_TABLE (table), 0, NULL);
|
||||
GTK_GRID (grid), 0, NULL);
|
||||
|
||||
/* Export Policies */
|
||||
vbox2 = prefs_frame_new (_("Export Policies"),
|
||||
@@ -1600,11 +1592,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
/* Scaling */
|
||||
vbox2 = prefs_frame_new (_("Scaling"), GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "interpolation-type", 0, 0,
|
||||
_("Default _interpolation:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
g_object_unref (size_group);
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
@@ -1652,7 +1644,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox));
|
||||
|
||||
{
|
||||
GtkWidget *combo;
|
||||
@@ -1660,9 +1652,9 @@ prefs_dialog_new (Gimp *gimp,
|
||||
combo = gimp_container_combo_box_new (gimp->templates,
|
||||
gimp_get_user_context (gimp),
|
||||
16, 0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||
_("_Template:"), 0.0, 0.5,
|
||||
combo, 1, FALSE);
|
||||
combo, 1);
|
||||
|
||||
gimp_container_view_select_item (GIMP_CONTAINER_VIEW (combo), NULL);
|
||||
|
||||
@@ -1672,18 +1664,19 @@ prefs_dialog_new (Gimp *gimp,
|
||||
}
|
||||
|
||||
editor = gimp_template_editor_new (core_config->default_image, gimp, FALSE);
|
||||
gtk_widget_set_vexpand (editor, FALSE);
|
||||
gimp_template_editor_show_advanced (GIMP_TEMPLATE_EDITOR (editor), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), editor, FALSE, FALSE, 0);
|
||||
gtk_widget_show (editor);
|
||||
|
||||
/* Quick Mask Color */
|
||||
vbox2 = prefs_frame_new (_("Quick Mask"), GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_color_button_add (object, "quick-mask-color",
|
||||
_("Quick Mask color:"),
|
||||
_("Set the default Quick Mask color"),
|
||||
GTK_TABLE (table), 0, NULL,
|
||||
GTK_GRID (grid), 0, NULL,
|
||||
gimp_get_user_context (gimp));
|
||||
|
||||
|
||||
@@ -1734,17 +1727,17 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("_Enable layer & channel previews"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "layer-preview-size", 0, 0,
|
||||
_("_Default layer & channel preview size:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
prefs_enum_combo_box_add (object, "undo-preview-size", 0, 0,
|
||||
_("_Undo preview size:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
prefs_enum_combo_box_add (object, "navigation-preview-size", 0, 0,
|
||||
_("Na_vigation preview size:"),
|
||||
GTK_TABLE (table), 2, size_group);
|
||||
GTK_GRID (grid), 2, size_group);
|
||||
|
||||
/* Keyboard Shortcuts */
|
||||
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"),
|
||||
@@ -1877,6 +1870,10 @@ prefs_dialog_new (Gimp *gimp,
|
||||
gimp);
|
||||
}
|
||||
|
||||
prefs_check_button_add (object, "prefer-dark-theme",
|
||||
_("Use dark theme variant if available"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
@@ -2084,30 +2081,30 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Color profile import dialog */
|
||||
vbox2 = prefs_frame_new (_("Color Profile Import Dialog"), GTK_CONTAINER (vbox),
|
||||
FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
|
||||
_("Color profile policy:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* All color profile chooser dialogs */
|
||||
vbox2 = prefs_frame_new (_("Color Profile File Dialogs"), GTK_CONTAINER (vbox),
|
||||
FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_file_chooser_button_add (object, "color-profile-path",
|
||||
_("Profile folder:"),
|
||||
_("Select Default Folder for Color Profiles"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Convert to Color Profile Dialog */
|
||||
vbox2 = prefs_frame_new (_("Convert to Color Profile Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "image-convert-profile-intent", 0, 0,
|
||||
_("Rendering intent:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_check_button_add (object, "image-convert-profile-black-point-compensation",
|
||||
_("Black point compensation"),
|
||||
@@ -2116,45 +2113,45 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Convert Precision Dialog */
|
||||
vbox2 = prefs_frame_new (_("Precision Conversion Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object,
|
||||
"image-convert-precision-layer-dither-method",
|
||||
0, 0,
|
||||
_("Dither layers:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
prefs_enum_combo_box_add (object,
|
||||
"image-convert-precision-text-layer-dither-method",
|
||||
0, 0,
|
||||
_("Dither text layers:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
prefs_enum_combo_box_add (object,
|
||||
"image-convert-precision-channel-dither-method",
|
||||
0, 0,
|
||||
_("Dither channels/masks:"),
|
||||
GTK_TABLE (table), 2, size_group);
|
||||
GTK_GRID (grid), 2, size_group);
|
||||
|
||||
/* Convert Indexed Dialog */
|
||||
vbox2 = prefs_frame_new (_("Indexed Conversion Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "image-convert-indexed-palette-type", 0, 0,
|
||||
_("Colormap:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
prefs_spin_button_add (object, "image-convert-indexed-max-colors", 1.0, 8.0, 0,
|
||||
_("Maximum number of colors:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
prefs_check_button_add (object, "image-convert-indexed-remove-duplicates",
|
||||
_("Remove unused and duplicate colors "
|
||||
"from colormap"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
prefs_enum_combo_box_add (object, "image-convert-indexed-dither-type", 0, 0,
|
||||
_("Color dithering:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_check_button_add (object, "image-convert-indexed-dither-alpha",
|
||||
_("Enable dithering of transparency"),
|
||||
@@ -2166,11 +2163,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Filter Dialogs */
|
||||
vbox2 = prefs_frame_new (_("Filter Dialogs"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "filter-tool-max-recent", 1.0, 8.0, 0,
|
||||
_("Keep recent settings:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
button = prefs_check_button_add (object, "filter-tool-use-last-settings",
|
||||
_("Default to the last used settings"),
|
||||
@@ -2182,14 +2179,14 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Canvas Size Dialog */
|
||||
vbox2 = prefs_frame_new (_("Canvas Size Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "image-resize-fill-type", 0, 0,
|
||||
_("Fill with:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
prefs_enum_combo_box_add (object, "image-resize-layer-set", 0, 0,
|
||||
_("Resize layers:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
prefs_check_button_add (object, "image-resize-resize-text-layers",
|
||||
_("Resize text layers"),
|
||||
@@ -2198,33 +2195,33 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* New Layer Dialog */
|
||||
vbox2 = prefs_frame_new (_("New Layer Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_entry_add (object, "layer-new-name",
|
||||
_("Layer name:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_enum_combo_box_add (object, "layer-new-fill-type", 0, 0,
|
||||
_("Fill type:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
/* Layer Boundary Size Dialog */
|
||||
vbox2 = prefs_frame_new (_("Layer Boundary Size Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "layer-resize-fill-type", 0, 0,
|
||||
_("Fill with:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Add Layer Mask Dialog */
|
||||
vbox2 = prefs_frame_new (_("Add Layer Mask Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "layer-add-mask-type", 0, 0,
|
||||
_("Layer mask type:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_check_button_add (object, "layer-add-mask-invert",
|
||||
_("Invert mask"),
|
||||
@@ -2233,13 +2230,13 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Merge Layers Dialog */
|
||||
vbox2 = prefs_frame_new (_("Merge Layers Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "layer-merge-type",
|
||||
GIMP_EXPAND_AS_NECESSARY,
|
||||
GIMP_CLIP_TO_BOTTOM_LAYER,
|
||||
_("Merged layer size:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_check_button_add (object, "layer-merge-active-group-only",
|
||||
_("Merge within active group only"),
|
||||
@@ -2251,36 +2248,36 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* New Channel Dialog */
|
||||
vbox2 = prefs_frame_new (_("New Channel Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_entry_add (object, "channel-new-name",
|
||||
_("Channel name:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_color_button_add (object, "channel-new-color",
|
||||
_("Color and opacity:"),
|
||||
_("Default New Channel Color and Opacity"),
|
||||
GTK_TABLE (table), 1, size_group,
|
||||
GTK_GRID (grid), 1, size_group,
|
||||
gimp_get_user_context (gimp));
|
||||
|
||||
/* New Path Dialog */
|
||||
vbox2 = prefs_frame_new (_("New Path Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_entry_add (object, "path-new-name",
|
||||
_("Path name:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Export Path Dialog */
|
||||
vbox2 = prefs_frame_new (_("Export Paths Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_file_chooser_button_add (object, "path-export-path",
|
||||
_("Export folder:"),
|
||||
_("Select Default Folder for Exporting Paths"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_check_button_add (object, "path-export-active-only",
|
||||
_("Export the active path only"),
|
||||
@@ -2289,12 +2286,12 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Import Path Dialog */
|
||||
vbox2 = prefs_frame_new (_("Import Paths Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_file_chooser_button_add (object, "path-import-path",
|
||||
_("Import folder:"),
|
||||
_("Select Default Folder for Importing Paths"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_check_button_add (object, "path-import-merge",
|
||||
_("Merge imported paths"),
|
||||
@@ -2306,29 +2303,29 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Feather Selection Dialog */
|
||||
vbox2 = prefs_frame_new (_("Feather Selection Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "selection-feather-radius", 1.0, 10.0, 2,
|
||||
_("Feather radius:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Grow Selection Dialog */
|
||||
vbox2 = prefs_frame_new (_("Grow Selection Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "selection-grow-radius", 1.0, 10.0, 0,
|
||||
_("Grow radius:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Shrink Selection Dialog */
|
||||
vbox2 = prefs_frame_new (_("Shrink Selection Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "selection-shrink-radius", 1.0, 10.0, 0,
|
||||
_("Shrink radius:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_check_button_add (object, "selection-shrink-edge-lock",
|
||||
_("Selected areas continue outside the image"),
|
||||
@@ -2337,15 +2334,15 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Border Selection Dialog */
|
||||
vbox2 = prefs_frame_new (_("Border Selection Dialog"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "selection-border-radius", 1.0, 10.0, 0,
|
||||
_("Border radius:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
prefs_enum_combo_box_add (object, "selection-border-style", 0, 0,
|
||||
_("Border style:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
prefs_check_button_add (object, "selection-border-edge-lock",
|
||||
_("Selected areas continue outside the image"),
|
||||
@@ -2355,10 +2352,10 @@ prefs_dialog_new (Gimp *gimp,
|
||||
vbox2 = prefs_frame_new (_("Fill Selection Outline & Fill Path Dialogs"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
table = gimp_fill_editor_new (GIMP_DIALOG_CONFIG (object)->fill_options,
|
||||
FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
editor = gimp_fill_editor_new (GIMP_DIALOG_CONFIG (object)->fill_options,
|
||||
FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), editor, FALSE, FALSE, 0);
|
||||
gtk_widget_show (editor);
|
||||
|
||||
/* Stroke Options Dialog */
|
||||
vbox2 = prefs_frame_new (_("Stroke Selection & Stroke Path Dialogs"),
|
||||
@@ -2370,11 +2367,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
* uses the y resolution on the opened image. So using the y resolution
|
||||
* of the default image seems like the best compromise in the preferences.
|
||||
*/
|
||||
table = gimp_stroke_editor_new (GIMP_DIALOG_CONFIG (object)->stroke_options,
|
||||
gimp_template_get_resolution_y (core_config->default_image),
|
||||
FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
editor = gimp_stroke_editor_new (GIMP_DIALOG_CONFIG (object)->stroke_options,
|
||||
gimp_template_get_resolution_y (core_config->default_image),
|
||||
FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), editor, FALSE, FALSE, 0);
|
||||
gtk_widget_show (editor);
|
||||
|
||||
g_object_unref (size_group);
|
||||
|
||||
@@ -2402,12 +2399,12 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("Show help _buttons"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
button = prefs_boolean_combo_box_add (object, "user-manual-online",
|
||||
_("Use the online version"),
|
||||
_("Use a locally installed copy"),
|
||||
_("User manual:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
gimp_help_set_help_data (button, NULL, NULL);
|
||||
|
||||
manuals = gimp_help_get_installed_languages ();
|
||||
@@ -2442,7 +2439,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
g_signal_connect (entry, "changed",
|
||||
G_CALLBACK (prefs_help_language_change_callback),
|
||||
gimp);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), entry, 1, 2, 1, 2);
|
||||
gtk_grid_attach (GTK_GRID (grid), entry, 1, 1, 1, 1);
|
||||
gtk_widget_show (entry);
|
||||
}
|
||||
|
||||
@@ -2467,7 +2464,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
g_list_free_full (manuals, g_free);
|
||||
}
|
||||
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 2, 3);
|
||||
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 2, 1, 1);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* Help Browser */
|
||||
@@ -2480,11 +2477,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
if (gimp_help_browser_is_installed (gimp))
|
||||
{
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
button = prefs_enum_combo_box_add (object, "help-browser", 0, 0,
|
||||
_("H_elp browser to use:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2507,14 +2504,14 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
/* Action Search */
|
||||
vbox2 = prefs_frame_new (_("Action Search"), GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_check_button_add (object, "search-show-unavailable-actions",
|
||||
_("Show _unavailable actions"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_spin_button_add (object, "action-history-size", 1.0, 10.0, 0,
|
||||
_("Maximum History Size:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
button = prefs_button_add (GIMP_ICON_SHRED,
|
||||
_("Clear Action History"),
|
||||
@@ -2542,14 +2539,14 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
/* Transparency */
|
||||
vbox2 = prefs_frame_new (_("Transparency"), GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "transparency-type", 0, 0,
|
||||
_("_Check style:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
prefs_enum_combo_box_add (object, "transparency-size", 0, 0,
|
||||
_("Check _size:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
vbox2 = prefs_frame_new (_("Monitor Resolution"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
@@ -2569,8 +2566,8 @@ prefs_dialog_new (Gimp *gimp,
|
||||
g_free (pixels_per_unit);
|
||||
}
|
||||
|
||||
gtk_table_set_col_spacings (GTK_TABLE (entry), 2);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (entry), 2);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (entry), 2);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (entry), 2);
|
||||
|
||||
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
|
||||
_("Horizontal"), 0, 1, 0.0);
|
||||
@@ -2580,6 +2577,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("ppi"), 1, 4, 0.0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_widget_set_halign (hbox, GTK_ALIGN_START);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 24);
|
||||
gtk_widget_show (entry);
|
||||
@@ -2592,8 +2590,7 @@ prefs_dialog_new (Gimp *gimp,
|
||||
gdouble yres;
|
||||
gchar *str;
|
||||
|
||||
gimp_get_monitor_resolution (gdk_screen_get_default (), /* FIXME monitor */
|
||||
0, /* FIXME monitor */
|
||||
gimp_get_monitor_resolution (gdk_display_get_monitor (gdk_display_get_default (), 0),
|
||||
&xres, &yres);
|
||||
|
||||
str = g_strdup_printf (_("_Detect automatically (currently %d × %d ppi)"),
|
||||
@@ -2631,7 +2628,10 @@ prefs_dialog_new (Gimp *gimp,
|
||||
|
||||
calibrate_button = gtk_button_new_with_mnemonic (_("C_alibrate..."));
|
||||
label = gtk_bin_get_child (GTK_BIN (calibrate_button));
|
||||
gtk_misc_set_padding (GTK_MISC (label), 4, 0);
|
||||
g_object_set (label,
|
||||
"margin-start", 4,
|
||||
"margin-end", 4,
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (calibrate_button);
|
||||
gtk_widget_set_sensitive (calibrate_button,
|
||||
@@ -2666,11 +2666,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
vbox2 = prefs_frame_new (_("Window Manager Hints"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "dock-window-hint", 0, 0,
|
||||
_("Hint for _docks and toolbox:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
GTK_GRID (grid), 1, size_group);
|
||||
|
||||
vbox2 = prefs_frame_new (_("Focus"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
@@ -2727,11 +2727,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("Use \"_Dot for dot\" by default"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "marching-ants-speed", 1.0, 10.0, 0,
|
||||
_("Marching _ants speed:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Zoom & Resize Behavior */
|
||||
vbox2 = prefs_frame_new (_("Zoom & Resize Behavior"),
|
||||
@@ -2744,23 +2744,23 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("Resize window on image _size change"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_boolean_combo_box_add (object, "initial-zoom-to-fit",
|
||||
_("Show entire image"),
|
||||
"1:1",
|
||||
_("Initial zoom _ratio:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Space Bar */
|
||||
vbox2 = prefs_frame_new (_("Space Bar"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "space-bar-action", 0, 0,
|
||||
_("_While space bar is pressed:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
/* Mouse Pointers */
|
||||
vbox2 = prefs_frame_new (_("Mouse Pointers"),
|
||||
@@ -2773,14 +2773,14 @@ prefs_dialog_new (Gimp *gimp,
|
||||
_("Show pointer for paint _tools"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_enum_combo_box_add (object, "cursor-mode", 0, 0,
|
||||
_("Pointer _mode:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
prefs_enum_combo_box_add (object, "cursor-handedness", 0, 0,
|
||||
_("Pointer _handedness:"),
|
||||
GTK_TABLE (table), 1, NULL);
|
||||
GTK_GRID (grid), 1, NULL);
|
||||
|
||||
g_object_unref (size_group);
|
||||
size_group = NULL;
|
||||
@@ -2954,11 +2954,11 @@ prefs_dialog_new (Gimp *gimp,
|
||||
/* Snapping Distance */
|
||||
vbox2 = prefs_frame_new (_("General"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
|
||||
|
||||
prefs_spin_button_add (object, "snap-distance", 1.0, 5.0, 0,
|
||||
_("_Snapping distance:"),
|
||||
GTK_TABLE (table), 0, size_group);
|
||||
GTK_GRID (grid), 0, size_group);
|
||||
|
||||
|
||||
/*******************/
|
||||
@@ -3057,14 +3057,14 @@ prefs_dialog_new (Gimp *gimp,
|
||||
}
|
||||
};
|
||||
|
||||
table = prefs_table_new (G_N_ELEMENTS (dirs) + 1, GTK_CONTAINER (vbox));
|
||||
grid = prefs_grid_new (GTK_CONTAINER (vbox));
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (dirs); i++)
|
||||
{
|
||||
prefs_file_chooser_button_add (object, dirs[i].property_name,
|
||||
gettext (dirs[i].label),
|
||||
gettext (dirs[i].dialog_title),
|
||||
GTK_TABLE (table), i, NULL);
|
||||
GTK_GRID (grid), i, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -92,7 +92,7 @@ print_size_dialog_new (GimpImage *image,
|
||||
PrintSizeDialog *private;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *entry;
|
||||
GtkWidget *label;
|
||||
GtkWidget *width;
|
||||
@@ -126,7 +126,7 @@ print_size_dialog_new (GimpImage *image,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
@@ -147,13 +147,10 @@ print_size_dialog_new (GimpImage *image,
|
||||
frame, FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
table = gtk_table_new (4, 3, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 12);
|
||||
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
|
||||
gtk_table_set_row_spacing (GTK_TABLE (table), 2, 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 12);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
/* the print size entry */
|
||||
|
||||
@@ -175,35 +172,30 @@ print_size_dialog_new (GimpImage *image,
|
||||
label = gtk_label_new_with_mnemonic (_("_Width:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), width);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("H_eight:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), height);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 0, 2);
|
||||
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 0, 1, 2);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
gtk_table_set_row_spacing (GTK_TABLE (entry), 0, 2);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 1, 6);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
|
||||
gtk_widget_show (entry);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||
GTK_SPIN_BUTTON (height), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (entry), height, 0, 1, 1, 2);
|
||||
gtk_grid_attach (GTK_GRID (entry), height, 0, 1, 1, 1);
|
||||
gtk_widget_show (height);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||
GTK_SPIN_BUTTON (width), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (entry), width, 0, 1, 0, 1);
|
||||
gtk_grid_attach (GTK_GRID (entry), width, 0, 0, 1, 1);
|
||||
gtk_widget_show (width);
|
||||
|
||||
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (entry), 0,
|
||||
@@ -236,19 +228,17 @@ print_size_dialog_new (GimpImage *image,
|
||||
label = gtk_label_new_with_mnemonic (_("_X resolution:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), width);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("_Y resolution:"));
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), height);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
|
||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 2, 4);
|
||||
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 2, 1, 2);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
entry = gimp_size_entry_new (0, gimp_image_get_unit (image), _("pixels/%a"),
|
||||
@@ -256,21 +246,17 @@ print_size_dialog_new (GimpImage *image,
|
||||
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION);
|
||||
private->resolution_entry = GIMP_SIZE_ENTRY (entry);
|
||||
|
||||
gtk_table_set_row_spacing (GTK_TABLE (entry), 0, 2);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 1, 2);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 2);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
|
||||
gtk_widget_show (entry);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||
GTK_SPIN_BUTTON (height), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (entry), height, 0, 1, 1, 2);
|
||||
gtk_grid_attach (GTK_GRID (entry), height, 0, 1, 1, 1);
|
||||
gtk_widget_show (height);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||
GTK_SPIN_BUTTON (width), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (entry), width, 0, 1, 0, 1);
|
||||
gtk_grid_attach (GTK_GRID (entry), width, 0, 0, 1, 1);
|
||||
gtk_widget_show (width);
|
||||
|
||||
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (entry), 0,
|
||||
@@ -286,7 +272,7 @@ print_size_dialog_new (GimpImage *image,
|
||||
chain = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
|
||||
if (ABS (private->xres - private->yres) < GIMP_MIN_RESOLUTION)
|
||||
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain), TRUE);
|
||||
gtk_table_attach_defaults (GTK_TABLE (entry), chain, 1, 2, 0, 2);
|
||||
gtk_grid_attach (GTK_GRID (entry), chain, 1, 0, 1, 2);
|
||||
gtk_widget_show (chain);
|
||||
|
||||
private->chain = GIMP_CHAIN_BUTTON (chain);
|
||||
|
@@ -175,7 +175,7 @@ quit_close_all_dialog_new (Gimp *gimp,
|
||||
private->ok_button = gtk_dialog_add_button (GTK_DIALOG (private->dialog),
|
||||
"", GTK_RESPONSE_OK);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (private->dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (private->dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -113,7 +113,6 @@ resize_dialog_new (GimpViewable *viewable,
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *abox;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *button;
|
||||
GtkWidget *spinbutton;
|
||||
@@ -188,7 +187,7 @@ resize_dialog_new (GimpViewable *viewable,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
@@ -244,15 +243,9 @@ resize_dialog_new (GimpViewable *viewable,
|
||||
private->offset = entry = gimp_size_entry_new (1, unit, "%p",
|
||||
TRUE, FALSE, FALSE, SB_WIDTH,
|
||||
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 1, 6);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (entry), 3, 12);
|
||||
gtk_table_set_row_spacing (GTK_TABLE (entry), 0, 2);
|
||||
|
||||
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
|
||||
GTK_SPIN_BUTTON (spinbutton), NULL);
|
||||
gtk_table_attach_defaults (GTK_TABLE (entry), spinbutton,
|
||||
1, 2, 0, 1);
|
||||
gtk_grid_attach (GTK_GRID (entry), spinbutton, 1, 0, 1, 1);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
|
||||
@@ -275,20 +268,17 @@ resize_dialog_new (GimpViewable *viewable,
|
||||
private);
|
||||
|
||||
button = gtk_button_new_with_mnemonic (_("C_enter"));
|
||||
gtk_table_attach_defaults (GTK_TABLE (entry), button, 4, 5, 1, 2);
|
||||
gtk_grid_attach (GTK_GRID (entry), button, 4, 1, 1, 1);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (offset_center_clicked),
|
||||
private);
|
||||
|
||||
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), abox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (abox);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_container_add (GTK_CONTAINER (abox), frame);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
private->area = gimp_offset_area_new (width, height);
|
||||
|
@@ -50,14 +50,12 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
|
||||
const gchar *icon_name)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *ruler;
|
||||
GtkWidget *label;
|
||||
GdkScreen *screen;
|
||||
GdkRectangle rect;
|
||||
gint monitor;
|
||||
GdkRectangle workarea;
|
||||
|
||||
g_return_if_fail (GIMP_IS_SIZE_ENTRY (resolution_entry));
|
||||
g_return_if_fail (gtk_widget_get_realized (resolution_entry));
|
||||
@@ -77,52 +75,45 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
screen = gtk_widget_get_screen (dialog);
|
||||
monitor = gdk_screen_get_monitor_at_window (screen,
|
||||
gtk_widget_get_window (resolution_entry));
|
||||
gdk_screen_get_monitor_workarea (screen, monitor, &rect);
|
||||
gdk_monitor_get_workarea (gimp_widget_get_monitor (dialog), &workarea);
|
||||
|
||||
ruler_width = rect.width - 300 - (rect.width % 100);
|
||||
ruler_height = rect.height - 300 - (rect.height % 100);
|
||||
ruler_width = workarea.width - 300 - (workarea.width % 100);
|
||||
ruler_height = workarea.height - 300 - (workarea.height % 100);
|
||||
|
||||
table = gtk_table_new (4, 4, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (grid), 12);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
table, TRUE, TRUE, 0);
|
||||
gtk_widget_show (table);
|
||||
grid, TRUE, TRUE, 0);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
if (icon_name)
|
||||
{
|
||||
GtkWidget *image = gtk_image_new_from_icon_name (icon_name,
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 1,
|
||||
GTK_SHRINK, GTK_SHRINK, 4, 4);
|
||||
gtk_grid_attach (GTK_GRID (grid), image, 0, 0, 1, 1);
|
||||
gtk_widget_show (image);
|
||||
}
|
||||
|
||||
ruler = gimp_ruler_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_widget_set_size_request (ruler, ruler_width, 32);
|
||||
gimp_ruler_set_range (GIMP_RULER (ruler), 0, ruler_width, ruler_width);
|
||||
gtk_table_attach (GTK_TABLE (table), ruler, 1, 3, 0, 1,
|
||||
GTK_SHRINK, GTK_SHRINK, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), ruler, 1, 0, 2, 1);
|
||||
gtk_widget_show (ruler);
|
||||
|
||||
ruler = gimp_ruler_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_widget_set_size_request (ruler, 32, ruler_height);
|
||||
gimp_ruler_set_range (GIMP_RULER (ruler), 0, ruler_height, ruler_height);
|
||||
gtk_table_attach (GTK_TABLE (table), ruler, 0, 1, 1, 3,
|
||||
GTK_SHRINK, GTK_SHRINK, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), ruler, 0, 1, 1, 2);
|
||||
gtk_widget_show (ruler);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_table_attach (GTK_TABLE (table), vbox, 1, 2, 1, 2,
|
||||
GTK_SHRINK, GTK_SHRINK, 0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), vbox, 1, 1, 1, 1);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
label =
|
||||
|
@@ -139,7 +139,7 @@ scale_dialog_new (GimpViewable *viewable,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
|
@@ -130,7 +130,7 @@ stroke_dialog_new (GimpItem *item,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_RESET,
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
@@ -166,20 +166,12 @@ stroke_dialog_new (GimpItem *item,
|
||||
g_object_ref_sink (radio_box);
|
||||
g_object_unref (radio_box);
|
||||
|
||||
{
|
||||
PangoFontDescription *font_desc;
|
||||
|
||||
font_desc = pango_font_description_new ();
|
||||
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
|
||||
|
||||
gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (cairo_radio)),
|
||||
font_desc);
|
||||
gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (paint_radio)),
|
||||
font_desc);
|
||||
|
||||
pango_font_description_free (font_desc);
|
||||
}
|
||||
|
||||
gimp_label_set_attributes (GTK_LABEL (gtk_bin_get_child (GTK_BIN (cairo_radio))),
|
||||
PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD,
|
||||
-1);
|
||||
gimp_label_set_attributes (GTK_LABEL (gtk_bin_get_child (GTK_BIN (paint_radio))),
|
||||
PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD,
|
||||
-1);
|
||||
|
||||
/* the stroke frame */
|
||||
|
||||
|
@@ -120,7 +120,7 @@ template_options_dialog_new (GimpTemplate *template,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -42,24 +42,13 @@ enum
|
||||
RESPONSE_NEXT = 2
|
||||
};
|
||||
|
||||
|
||||
/* eek, see bug 762279 */
|
||||
GtkLinkButtonUriFunc
|
||||
gtk_link_button_set_uri_hook (GtkLinkButtonUriFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy);
|
||||
static void tips_uri_hook (GtkLinkButton *button,
|
||||
const gchar *link_,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
static void tips_dialog_set_tip (GimpTip *tip);
|
||||
static void tips_dialog_response (GtkWidget *dialog,
|
||||
gint response);
|
||||
static void tips_dialog_destroy (GtkWidget *widget,
|
||||
GimpGuiConfig *config);
|
||||
static void more_button_clicked (GtkWidget *button,
|
||||
Gimp *gimp);
|
||||
static void tips_dialog_set_tip (GimpTip *tip);
|
||||
static void tips_dialog_response (GtkWidget *dialog,
|
||||
gint response);
|
||||
static void tips_dialog_destroy (GtkWidget *widget,
|
||||
GimpGuiConfig *config);
|
||||
static gboolean more_button_clicked (GtkWidget *button,
|
||||
Gimp *gimp);
|
||||
|
||||
|
||||
static GtkWidget *tips_dialog = NULL;
|
||||
@@ -182,7 +171,7 @@ tips_dialog_create (Gimp *gimp)
|
||||
|
||||
image = gtk_image_new_from_icon_name (GIMP_ICON_DIALOG_INFORMATION,
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_START);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
|
||||
@@ -206,10 +195,7 @@ tips_dialog_create (Gimp *gimp)
|
||||
gtk_widget_show (more_button);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), more_button, FALSE, FALSE, 0);
|
||||
|
||||
/* this is deprecated but better than showing two URIs, see bug #762279 */
|
||||
gtk_link_button_set_uri_hook (tips_uri_hook, NULL, NULL);
|
||||
|
||||
g_signal_connect (more_button, "clicked",
|
||||
g_signal_connect (more_button, "activate-link",
|
||||
G_CALLBACK (more_button_clicked),
|
||||
gimp);
|
||||
|
||||
@@ -261,27 +247,22 @@ tips_dialog_set_tip (GimpTip *tip)
|
||||
|
||||
gtk_label_set_markup (GTK_LABEL (tip_label), tip->text);
|
||||
|
||||
gtk_link_button_set_visited (GTK_LINK_BUTTON (more_button), FALSE);
|
||||
/* set the URI to unset the "visited" state */
|
||||
gtk_link_button_set_uri (GTK_LINK_BUTTON (more_button),
|
||||
"http://docs.gimp.org/");
|
||||
|
||||
gtk_widget_set_sensitive (more_button, tip->help_id != NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
more_button_clicked (GtkWidget *button,
|
||||
Gimp *gimp)
|
||||
{
|
||||
GimpTip *tip = current_tip->data;
|
||||
|
||||
g_signal_stop_emission_by_name (button, "clicked");
|
||||
|
||||
if (tip->help_id)
|
||||
gimp_help (gimp, NULL, NULL, tip->help_id);
|
||||
}
|
||||
|
||||
static void
|
||||
tips_uri_hook (GtkLinkButton *button,
|
||||
const gchar *link_,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* do nothing */
|
||||
/* Do not run the link set at construction. */
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ vectors_export_dialog_new (GimpImage *image,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -91,7 +91,7 @@ vectors_import_dialog_new (GimpImage *image,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -56,8 +56,7 @@ static void gimp_canvas_get_property (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_canvas_unrealize (GtkWidget *widget);
|
||||
static void gimp_canvas_style_set (GtkWidget *widget,
|
||||
GtkStyle *prev_style);
|
||||
static void gimp_canvas_style_updated (GtkWidget *widget);
|
||||
static gboolean gimp_canvas_focus_in_event (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
static gboolean gimp_canvas_focus_out_event (GtkWidget *widget,
|
||||
@@ -81,7 +80,7 @@ gimp_canvas_class_init (GimpCanvasClass *klass)
|
||||
object_class->get_property = gimp_canvas_get_property;
|
||||
|
||||
widget_class->unrealize = gimp_canvas_unrealize;
|
||||
widget_class->style_set = gimp_canvas_style_set;
|
||||
widget_class->style_updated = gimp_canvas_style_updated;
|
||||
widget_class->focus_in_event = gimp_canvas_focus_in_event;
|
||||
widget_class->focus_out_event = gimp_canvas_focus_out_event;
|
||||
widget_class->focus = gimp_canvas_focus;
|
||||
@@ -100,7 +99,6 @@ gimp_canvas_init (GimpCanvas *canvas)
|
||||
|
||||
gtk_widget_set_can_focus (widget, TRUE);
|
||||
gtk_widget_add_events (widget, GIMP_CANVAS_EVENT_MASK);
|
||||
gtk_widget_set_extension_events (widget, GDK_EXTENSION_EVENTS_ALL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -154,12 +152,11 @@ gimp_canvas_unrealize (GtkWidget *widget)
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_canvas_style_set (GtkWidget *widget,
|
||||
GtkStyle *prev_style)
|
||||
gimp_canvas_style_updated (GtkWidget *widget)
|
||||
{
|
||||
GimpCanvas *canvas = GIMP_CANVAS (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (parent_class)->style_set (widget, prev_style);
|
||||
GTK_WIDGET_CLASS (parent_class)->style_updated (widget);
|
||||
|
||||
g_clear_object (&canvas->layout);
|
||||
}
|
||||
@@ -279,20 +276,13 @@ void
|
||||
gimp_canvas_set_bg_color (GimpCanvas *canvas,
|
||||
GimpRGB *color)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (canvas);
|
||||
GdkColormap *colormap;
|
||||
GdkColor gdk_color;
|
||||
GtkWidget *widget = GTK_WIDGET (canvas);
|
||||
|
||||
if (! gtk_widget_get_realized (widget))
|
||||
return;
|
||||
|
||||
gimp_rgb_get_gdk_color (color, &gdk_color);
|
||||
|
||||
colormap = gdk_drawable_get_colormap (gtk_widget_get_window (widget));
|
||||
g_return_if_fail (colormap != NULL);
|
||||
gdk_colormap_alloc_color (colormap, &gdk_color, FALSE, TRUE);
|
||||
|
||||
gdk_window_set_background (gtk_widget_get_window (widget), &gdk_color);
|
||||
gdk_window_set_background_rgba (gtk_widget_get_window (widget),
|
||||
(GdkRGBA *) color);
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (canvas));
|
||||
}
|
||||
|
@@ -26,6 +26,8 @@
|
||||
GDK_POINTER_MOTION_MASK | \
|
||||
GDK_BUTTON_PRESS_MASK | \
|
||||
GDK_BUTTON_RELEASE_MASK | \
|
||||
GDK_SCROLL_MASK | \
|
||||
GDK_SMOOTH_SCROLL_MASK | \
|
||||
GDK_STRUCTURE_MASK | \
|
||||
GDK_ENTER_NOTIFY_MASK | \
|
||||
GDK_LEAVE_NOTIFY_MASK | \
|
||||
|
@@ -248,11 +248,14 @@ gimp_canvas_path_get_extents (GimpCanvasItem *item)
|
||||
|
||||
if (private->path && gtk_widget_get_realized (canvas))
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
cairo_rectangle_int_t rectangle;
|
||||
gdouble x1, y1, x2, y2;
|
||||
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (canvas));
|
||||
surface = cairo_recording_surface_create (CAIRO_CONTENT_COLOR, NULL);
|
||||
cr = cairo_create (surface);
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
cairo_save (cr);
|
||||
gimp_canvas_item_transform (item, cr);
|
||||
|
@@ -83,8 +83,8 @@ struct _GimpCursorViewPriv
|
||||
GimpContext *context;
|
||||
GimpDisplayShell *shell;
|
||||
GimpImage *image;
|
||||
GimpUnit unit;
|
||||
|
||||
GimpUnit unit;
|
||||
guint cursor_idle_id;
|
||||
GimpImage *cursor_image;
|
||||
GimpUnit cursor_unit;
|
||||
@@ -105,8 +105,7 @@ static void gimp_cursor_view_get_property (GObject *o
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_cursor_view_style_set (GtkWidget *widget,
|
||||
GtkStyle *prev_style);
|
||||
static void gimp_cursor_view_style_updated (GtkWidget *widget);
|
||||
|
||||
static void gimp_cursor_view_set_aux_info (GimpDocked *docked,
|
||||
GList *aux_info);
|
||||
@@ -153,11 +152,11 @@ gimp_cursor_view_class_init (GimpCursorViewClass* klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
object_class->dispose = gimp_cursor_view_dispose;
|
||||
object_class->get_property = gimp_cursor_view_get_property;
|
||||
object_class->set_property = gimp_cursor_view_set_property;
|
||||
object_class->dispose = gimp_cursor_view_dispose;
|
||||
object_class->get_property = gimp_cursor_view_get_property;
|
||||
object_class->set_property = gimp_cursor_view_set_property;
|
||||
|
||||
widget_class->style_set = gimp_cursor_view_style_set;
|
||||
widget_class->style_updated = gimp_cursor_view_style_updated;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_SAMPLE_MERGED,
|
||||
g_param_spec_boolean ("sample-merged",
|
||||
@@ -173,7 +172,7 @@ static void
|
||||
gimp_cursor_view_init (GimpCursorView *view)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *toggle;
|
||||
gint content_spacing;
|
||||
|
||||
@@ -216,23 +215,23 @@ gimp_cursor_view_init (GimpCursorView *view)
|
||||
gtk_box_pack_start (GTK_BOX (view->priv->coord_hbox), frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
view->priv->pixel_x_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->pixel_x_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("X"), 0.5, 0.5,
|
||||
view->priv->pixel_x_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||
_("X"), 0.5, 0.5,
|
||||
view->priv->pixel_x_label, 1);
|
||||
|
||||
view->priv->pixel_y_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->pixel_y_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Y"), 0.5, 0.5,
|
||||
view->priv->pixel_y_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
|
||||
_("Y"), 0.5, 0.5,
|
||||
view->priv->pixel_y_label, 1);
|
||||
|
||||
|
||||
/* Units */
|
||||
@@ -241,23 +240,23 @@ gimp_cursor_view_init (GimpCursorView *view)
|
||||
gtk_box_pack_start (GTK_BOX (view->priv->coord_hbox), frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 4);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
view->priv->unit_x_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->unit_x_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("X"), 0.5, 0.5,
|
||||
view->priv->unit_x_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||
_("X"), 0.5, 0.5,
|
||||
view->priv->unit_x_label, 1);
|
||||
|
||||
view->priv->unit_y_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->unit_y_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Y"), 0.5, 0.5,
|
||||
view->priv->unit_y_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
|
||||
_("Y"), 0.5, 0.5,
|
||||
view->priv->unit_y_label, 1);
|
||||
|
||||
|
||||
/* Selection Bounding Box */
|
||||
@@ -266,47 +265,47 @@ gimp_cursor_view_init (GimpCursorView *view)
|
||||
gtk_box_pack_start (GTK_BOX (view->priv->selection_hbox), frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
view->priv->selection_x_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_x_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("X"), 0.5, 0.5,
|
||||
view->priv->selection_x_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||
_("X"), 0.5, 0.5,
|
||||
view->priv->selection_x_label, 1);
|
||||
|
||||
view->priv->selection_y_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_y_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
_("Y"), 0.5, 0.5,
|
||||
view->priv->selection_y_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
|
||||
_("Y"), 0.5, 0.5,
|
||||
view->priv->selection_y_label, 1);
|
||||
|
||||
frame = gimp_frame_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (view->priv->selection_hbox), frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
gtk_widget_show (table);
|
||||
grid = gtk_grid_new ();
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 4);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
gtk_widget_show (grid);
|
||||
|
||||
view->priv->selection_width_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_width_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
/* Width */
|
||||
_("W"), 0.5, 0.5,
|
||||
view->priv->selection_width_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
|
||||
/* Width */
|
||||
_("W"), 0.5, 0.5,
|
||||
view->priv->selection_width_label, 1);
|
||||
|
||||
view->priv->selection_height_label = gtk_label_new (_("n/a"));
|
||||
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_height_label), 1.0);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
||||
/* Height */
|
||||
_("H"), 0.5, 0.5,
|
||||
view->priv->selection_height_label, 1, FALSE);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
|
||||
/* Height */
|
||||
_("H"), 0.5, 0.5,
|
||||
view->priv->selection_height_label, 1);
|
||||
|
||||
|
||||
/* color information */
|
||||
@@ -517,13 +516,12 @@ gimp_cursor_view_set_label_italic (GtkWidget *label,
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_cursor_view_style_set (GtkWidget *widget,
|
||||
GtkStyle *prev_style)
|
||||
gimp_cursor_view_style_updated (GtkWidget *widget)
|
||||
{
|
||||
GimpCursorView *view = GIMP_CURSOR_VIEW (widget);
|
||||
gint content_spacing;
|
||||
|
||||
GTK_WIDGET_CLASS (parent_class)->style_set (widget, prev_style);
|
||||
GTK_WIDGET_CLASS (parent_class)->style_updated (widget);
|
||||
|
||||
gtk_widget_style_get (GTK_WIDGET (view),
|
||||
"content-spacing", &content_spacing,
|
||||
|
@@ -389,8 +389,7 @@ gimp_display_new (Gimp *gimp,
|
||||
gdouble scale,
|
||||
GimpUIManager *popup_manager,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
GdkScreen *screen,
|
||||
gint monitor)
|
||||
GdkMonitor *monitor)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpDisplayPrivate *private;
|
||||
@@ -399,7 +398,7 @@ gimp_display_new (Gimp *gimp,
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), NULL);
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||
g_return_val_if_fail (GDK_IS_MONITOR (monitor), NULL);
|
||||
|
||||
/* If there isn't an interface, never create a display */
|
||||
if (gimp->no_interface)
|
||||
@@ -441,14 +440,12 @@ gimp_display_new (Gimp *gimp,
|
||||
window = gimp_image_window_new (gimp,
|
||||
private->image,
|
||||
dialog_factory,
|
||||
screen,
|
||||
monitor);
|
||||
}
|
||||
|
||||
/* create the shell for the image */
|
||||
private->shell = gimp_display_shell_new (display, unit, scale,
|
||||
popup_manager,
|
||||
screen,
|
||||
monitor);
|
||||
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
@@ -55,8 +55,7 @@ GimpDisplay * gimp_display_new (Gimp *gimp,
|
||||
gdouble scale,
|
||||
GimpUIManager *popup_manager,
|
||||
GimpDialogFactory *dialog_factory,
|
||||
GdkScreen *screen,
|
||||
gint monitor);
|
||||
GdkMonitor *monitor);
|
||||
void gimp_display_delete (GimpDisplay *display);
|
||||
void gimp_display_close (GimpDisplay *display);
|
||||
|
||||
|
@@ -61,25 +61,10 @@ gimp_display_shell_appearance_update (GimpDisplayShell *shell)
|
||||
|
||||
if (window)
|
||||
{
|
||||
GimpDockColumns *left_docks;
|
||||
GimpDockColumns *right_docks;
|
||||
gboolean fullscreen;
|
||||
gboolean has_grip;
|
||||
|
||||
fullscreen = gimp_image_window_get_fullscreen (window);
|
||||
gboolean fullscreen = gimp_image_window_get_fullscreen (window);
|
||||
|
||||
gimp_display_shell_set_action_active (shell, "view-fullscreen",
|
||||
fullscreen);
|
||||
|
||||
left_docks = gimp_image_window_get_left_docks (window);
|
||||
right_docks = gimp_image_window_get_right_docks (window);
|
||||
|
||||
has_grip = (! fullscreen &&
|
||||
! (left_docks && gimp_dock_columns_get_docks (left_docks)) &&
|
||||
! (right_docks && gimp_dock_columns_get_docks (right_docks)));
|
||||
|
||||
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (shell->statusbar),
|
||||
has_grip);
|
||||
}
|
||||
|
||||
gimp_display_shell_set_show_menubar (shell,
|
||||
@@ -449,13 +434,9 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
|
||||
case GIMP_CANVAS_PADDING_MODE_DEFAULT:
|
||||
if (shell->canvas)
|
||||
{
|
||||
GtkStyle *style;
|
||||
GtkStyleContext *style = gtk_widget_get_style_context (shell->canvas);
|
||||
|
||||
gtk_widget_ensure_style (shell->canvas);
|
||||
|
||||
style = gtk_widget_get_style (shell->canvas);
|
||||
|
||||
gimp_rgb_set_gdk_color (&color, style->bg + GTK_STATE_NORMAL);
|
||||
gtk_style_context_get_background_color (style, 0, (GdkRGBA *) &color);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -116,31 +116,6 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
|
||||
gtk_widget_set_size_request (GTK_WIDGET (shell), 0, 0);
|
||||
|
||||
shell->xfer = gimp_display_xfer_realize (GTK_WIDGET(shell));
|
||||
|
||||
/* HACK: remove with GTK+ 3.x: this unconditionally maps the
|
||||
* rulers, if configured to be hidden they are never visible to the
|
||||
* user because they will be hidden again right away.
|
||||
*
|
||||
* For some obscure reason, having the rulers mapped once prevents
|
||||
* crashes with tablets and on-canvas dialogs. See bug #784480 and
|
||||
* all its duplicates.
|
||||
*/
|
||||
gtk_widget_show (shell->hrule);
|
||||
gtk_widget_show (shell->vrule);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_canvas_realize_after (GtkWidget *canvas,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpImageWindow *window = gimp_display_shell_get_window (shell);
|
||||
|
||||
/* HACK: see above: must go with GTK+ 3.x too. Restore the rulers'
|
||||
* intended visibility again.
|
||||
*/
|
||||
gimp_image_window_suspend_keep_pos (window);
|
||||
gimp_display_shell_appearance_update (shell);
|
||||
gimp_image_window_resume_keep_pos (window);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -241,23 +216,17 @@ gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_display_shell_canvas_expose (GtkWidget *widget,
|
||||
GdkEventExpose *eevent,
|
||||
GimpDisplayShell *shell)
|
||||
gimp_display_shell_canvas_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
/* are we in destruction? */
|
||||
if (! shell->display || ! gimp_display_get_shell (shell->display))
|
||||
return TRUE;
|
||||
|
||||
/* ignore events on overlays */
|
||||
if (eevent->window == gtk_widget_get_window (widget))
|
||||
if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (shell->canvas));
|
||||
gdk_cairo_region (cr, eevent->region);
|
||||
cairo_clip (cr);
|
||||
|
||||
if (gimp_display_get_image (shell->display))
|
||||
{
|
||||
gimp_display_shell_canvas_draw_image (shell, cr);
|
||||
@@ -266,8 +235,6 @@ gimp_display_shell_canvas_expose (GtkWidget *widget,
|
||||
{
|
||||
gimp_display_shell_canvas_draw_drop_zone (shell, cr);
|
||||
}
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -310,10 +277,13 @@ gimp_display_shell_quick_mask_button_press (GtkWidget *widget,
|
||||
{
|
||||
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
|
||||
|
||||
gimp_ui_manager_ui_popup (manager,
|
||||
"/quick-mask-popup",
|
||||
GTK_WIDGET (shell),
|
||||
NULL, NULL, NULL, NULL);
|
||||
gimp_ui_manager_ui_popup_at_widget (manager,
|
||||
"/quick-mask-popup",
|
||||
widget,
|
||||
GDK_GRAVITY_EAST,
|
||||
GDK_GRAVITY_SOUTH_WEST,
|
||||
(GdkEvent *) bevent,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -354,7 +324,9 @@ gimp_display_shell_navigation_button_press (GtkWidget *widget,
|
||||
|
||||
if (bevent->type == GDK_BUTTON_PRESS && bevent->button == 1)
|
||||
{
|
||||
gimp_navigation_editor_popup (shell, widget, bevent->x, bevent->y);
|
||||
gimp_navigation_editor_popup (shell, widget,
|
||||
(GdkEvent *) bevent,
|
||||
bevent->x, bevent->y);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -553,12 +525,16 @@ gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
{
|
||||
PangoLayout *layout;
|
||||
gchar *msg;
|
||||
GtkAllocation allocation;
|
||||
gint width;
|
||||
gint height;
|
||||
gdouble scale;
|
||||
GtkWidget *widget = GTK_WIDGET (shell);
|
||||
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
||||
GtkStateFlags state = gtk_widget_get_state_flags (widget);
|
||||
PangoLayout *layout;
|
||||
gchar *msg;
|
||||
GtkAllocation allocation;
|
||||
gint width;
|
||||
gint height;
|
||||
gdouble scale;
|
||||
GdkRGBA color;
|
||||
|
||||
layout = gtk_widget_create_pango_layout (shell->canvas, NULL);
|
||||
|
||||
@@ -578,6 +554,9 @@ gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
|
||||
scale = MIN (((gdouble) allocation.width / 2.0) / (gdouble) width,
|
||||
((gdouble) allocation.height / 2.0) / (gdouble) height);
|
||||
|
||||
gtk_style_context_get_color (context, state, &color);
|
||||
gdk_cairo_set_source_rgba (cr, &color);
|
||||
|
||||
cairo_move_to (cr,
|
||||
(allocation.width - (width * scale)) / 2,
|
||||
(allocation.height - (height * scale)) / 2);
|
||||
|
@@ -21,13 +21,11 @@
|
||||
|
||||
void gimp_display_shell_canvas_realize (GtkWidget *widget,
|
||||
GimpDisplayShell *shell);
|
||||
void gimp_display_shell_canvas_realize_after (GtkWidget *widget,
|
||||
GimpDisplayShell *shell);
|
||||
void gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *alloc,
|
||||
GimpDisplayShell *shell);
|
||||
gboolean gimp_display_shell_canvas_expose (GtkWidget *widget,
|
||||
GdkEventExpose *eevent,
|
||||
gboolean gimp_display_shell_canvas_draw (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
GimpDisplayShell *shell);
|
||||
|
||||
gboolean gimp_display_shell_origin_button_press (GtkWidget *widget,
|
||||
|
@@ -183,7 +183,7 @@ gimp_display_shell_close_dialog (GimpDisplayShell *shell,
|
||||
g_free (title);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
RESPONSE_SAVE,
|
||||
GTK_RESPONSE_CLOSE,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
|
@@ -225,8 +225,7 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
|
||||
image = gimp_image_new_from_drawable (shell->display->gimp,
|
||||
GIMP_DRAWABLE (viewable));
|
||||
gimp_create_display (shell->display->gimp, image, GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (image);
|
||||
|
||||
return;
|
||||
@@ -460,8 +459,7 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
|
||||
image = gimp_image_new_from_buffer (shell->display->gimp,
|
||||
GIMP_BUFFER (viewable));
|
||||
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (image);
|
||||
|
||||
return;
|
||||
@@ -584,8 +582,7 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
|
||||
new_image = file_open_with_display (shell->display->gimp, context,
|
||||
NULL,
|
||||
file, FALSE,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget),
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)),
|
||||
&status, &error);
|
||||
|
||||
if (! new_image && status != GIMP_PDB_CANCEL)
|
||||
@@ -597,8 +594,7 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
|
||||
image = file_open_with_display (shell->display->gimp, context,
|
||||
GIMP_PROGRESS (shell->display),
|
||||
file, FALSE,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget),
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
@@ -648,8 +644,7 @@ gimp_display_shell_drop_component (GtkWidget *widget,
|
||||
dest_image = gimp_image_new_from_component (image->gimp,
|
||||
image, component);
|
||||
gimp_create_display (dest_image->gimp, dest_image, GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (dest_image);
|
||||
|
||||
return;
|
||||
@@ -706,8 +701,7 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
|
||||
image = gimp_image_new_from_pixbuf (shell->display->gimp, pixbuf,
|
||||
_("Dropped Buffer"));
|
||||
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (image);
|
||||
|
||||
return;
|
||||
|
@@ -42,7 +42,7 @@
|
||||
#include "gimpdisplayxfer.h"
|
||||
|
||||
|
||||
/* #define GIMP_DISPLAY_RENDER_ENABLE_SCALING 1 */
|
||||
#define GIMP_DISPLAY_RENDER_ENABLE_SCALING 1
|
||||
|
||||
|
||||
/* public functions */
|
||||
@@ -160,7 +160,10 @@ gimp_display_shell_draw_image (GimpDisplayShell *shell,
|
||||
chunk_height = GIMP_DISPLAY_RENDER_BUF_HEIGHT;
|
||||
|
||||
#ifdef GIMP_DISPLAY_RENDER_ENABLE_SCALING
|
||||
/* if we had this future API, things would look pretty on hires (retina) */
|
||||
/* multiply the image scale-factor by the window scale-factor, and divide
|
||||
* the cairo scale-factor by the same amount (further down), so that we make
|
||||
* full use of the screen resolution, even on hidpi displays.
|
||||
*/
|
||||
scale *=
|
||||
gdk_window_get_scale_factor (
|
||||
gtk_widget_get_window (gtk_widget_get_toplevel (GTK_WIDGET (shell))));
|
||||
|
@@ -42,29 +42,14 @@ void
|
||||
gimp_display_shell_expose_region (GimpDisplayShell *shell,
|
||||
cairo_region_t *region)
|
||||
{
|
||||
GdkWindow *window;
|
||||
gint n_rectangles;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (region != NULL);
|
||||
|
||||
if (! gtk_widget_get_realized (shell->canvas))
|
||||
return;
|
||||
|
||||
window = gtk_widget_get_window (shell->canvas);
|
||||
n_rectangles = cairo_region_num_rectangles (region);
|
||||
|
||||
for (i = 0; i < n_rectangles; i++)
|
||||
{
|
||||
cairo_rectangle_int_t rectangle;
|
||||
|
||||
cairo_region_get_rectangle (region, i, &rectangle);
|
||||
|
||||
gdk_window_invalidate_rect (window,
|
||||
(GdkRectangle *) &rectangle,
|
||||
TRUE);
|
||||
}
|
||||
gdk_window_invalidate_region (gtk_widget_get_window (shell->canvas),
|
||||
region, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -89,7 +89,7 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (cdd->dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (cdd->dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
@@ -78,9 +78,12 @@ gimp_display_shell_has_filter (GimpDisplayShell *shell)
|
||||
|
||||
if (shell->filter_stack)
|
||||
{
|
||||
GList *filters;
|
||||
GList *iter;
|
||||
|
||||
for (iter = shell->filter_stack->filters; iter; iter = g_list_next (iter))
|
||||
filters = gimp_color_display_stack_get_filters (shell->filter_stack);
|
||||
|
||||
for (iter = filters; iter; iter = g_list_next (iter))
|
||||
{
|
||||
if (gimp_color_display_get_enabled (GIMP_COLOR_DISPLAY (iter->data)))
|
||||
return TRUE;
|
||||
|
@@ -24,41 +24,110 @@
|
||||
|
||||
#include "display-types.h"
|
||||
|
||||
#include "widgets/gimpdevices.h"
|
||||
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-grab.h"
|
||||
|
||||
|
||||
static GdkDevice *
|
||||
get_associated_pointer (GdkDevice *device)
|
||||
{
|
||||
switch (gdk_device_get_device_type (device))
|
||||
{
|
||||
case GDK_DEVICE_TYPE_SLAVE:
|
||||
device = gdk_device_get_associated_device (device);
|
||||
break;
|
||||
|
||||
case GDK_DEVICE_TYPE_FLOATING:
|
||||
{
|
||||
GdkDisplay *display = gdk_device_get_display (device);
|
||||
GdkDeviceManager *manager = gdk_display_get_device_manager (display);
|
||||
|
||||
return gdk_device_manager_get_client_pointer (manager);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
device = gdk_device_get_associated_device (device);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
get_associated_keyboard (GdkDevice *device)
|
||||
{
|
||||
switch (gdk_device_get_device_type (device))
|
||||
{
|
||||
case GDK_DEVICE_TYPE_SLAVE:
|
||||
device = gdk_device_get_associated_device (device);
|
||||
break;
|
||||
|
||||
case GDK_DEVICE_TYPE_FLOATING:
|
||||
{
|
||||
GdkDisplay *display = gdk_device_get_display (device);
|
||||
GdkDeviceManager *manager = gdk_display_get_device_manager (display);
|
||||
|
||||
device = gdk_device_manager_get_client_pointer (manager);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
device = gdk_device_get_associated_device (device);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
|
||||
const GdkEvent *event,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
GdkDevice *device;
|
||||
GdkDevice *source_device;
|
||||
GdkGrabStatus status;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
g_return_val_if_fail (shell->pointer_grabbed == FALSE, FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
g_return_val_if_fail (shell->grab_pointer == NULL, FALSE);
|
||||
|
||||
if (event)
|
||||
source_device = gimp_devices_get_from_event (shell->display->gimp,
|
||||
event, &device);
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
GdkGrabStatus status;
|
||||
|
||||
status = gdk_pointer_grab (gtk_widget_get_window (shell->canvas),
|
||||
FALSE, event_mask, NULL, NULL,
|
||||
gdk_event_get_time (event));
|
||||
|
||||
if (status != GDK_GRAB_SUCCESS)
|
||||
{
|
||||
g_printerr ("%s: gdk_pointer_grab failed with status %d\n",
|
||||
G_STRFUNC, status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
shell->pointer_grab_time = gdk_event_get_time (event);
|
||||
device = get_associated_pointer (device);
|
||||
source_device = NULL;
|
||||
}
|
||||
|
||||
gtk_grab_add (shell->canvas);
|
||||
status = gdk_device_grab (device,
|
||||
gtk_widget_get_window (shell->canvas),
|
||||
GDK_OWNERSHIP_APPLICATION,
|
||||
FALSE, event_mask, NULL,
|
||||
gdk_event_get_time (event));
|
||||
|
||||
shell->pointer_grabbed = TRUE;
|
||||
if (status == GDK_GRAB_SUCCESS)
|
||||
{
|
||||
shell->grab_pointer = device;
|
||||
shell->grab_pointer_source = source_device;
|
||||
shell->grab_pointer_time = gdk_event_get_time (event);
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_printerr ("%s: gdk_device_grab(%s) failed with status %d\n",
|
||||
G_STRFUNC, gdk_device_get_name (device), status);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -66,46 +135,59 @@ gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
|
||||
const GdkEvent *event)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (shell->pointer_grabbed == TRUE);
|
||||
g_return_if_fail (event != NULL);
|
||||
g_return_if_fail (shell->grab_pointer != NULL);
|
||||
|
||||
gtk_grab_remove (shell->canvas);
|
||||
gdk_device_ungrab (shell->grab_pointer, shell->grab_pointer_time);
|
||||
|
||||
if (event)
|
||||
{
|
||||
gdk_display_pointer_ungrab (gtk_widget_get_display (shell->canvas),
|
||||
shell->pointer_grab_time);
|
||||
|
||||
shell->pointer_grab_time = 0;
|
||||
}
|
||||
|
||||
shell->pointer_grabbed = FALSE;
|
||||
shell->grab_pointer = NULL;
|
||||
shell->grab_pointer_source = NULL;
|
||||
shell->grab_pointer_time = 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
|
||||
const GdkEvent *event)
|
||||
{
|
||||
GdkGrabStatus status;
|
||||
GdkDevice *device;
|
||||
GdkDevice *source_device;
|
||||
GdkGrabStatus status;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
g_return_val_if_fail (shell->keyboard_grabbed == FALSE, FALSE);
|
||||
g_return_val_if_fail (shell->grab_keyboard == NULL, FALSE);
|
||||
|
||||
status = gdk_keyboard_grab (gtk_widget_get_window (shell->canvas),
|
||||
FALSE,
|
||||
gdk_event_get_time (event));
|
||||
source_device = gimp_devices_get_from_event (shell->display->gimp,
|
||||
event, &device);
|
||||
|
||||
if (status != GDK_GRAB_SUCCESS)
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
g_printerr ("%s: gdk_keyboard_grab failed with status %d\n",
|
||||
G_STRFUNC, status);
|
||||
return FALSE;
|
||||
device = get_associated_keyboard (device);
|
||||
source_device = NULL;
|
||||
}
|
||||
|
||||
shell->keyboard_grabbed = TRUE;
|
||||
shell->keyboard_grab_time = gdk_event_get_time (event);
|
||||
status = gdk_device_grab (device,
|
||||
gtk_widget_get_window (shell->canvas),
|
||||
GDK_OWNERSHIP_APPLICATION,
|
||||
FALSE,
|
||||
GDK_KEY_PRESS_MASK |
|
||||
GDK_KEY_RELEASE_MASK |
|
||||
GDK_FOCUS_CHANGE_MASK,
|
||||
NULL, gdk_event_get_time (event));
|
||||
|
||||
return TRUE;
|
||||
if (status == GDK_GRAB_SUCCESS)
|
||||
{
|
||||
shell->grab_keyboard = device;
|
||||
shell->grab_keyboard_source = source_device;
|
||||
shell->grab_keyboard_time = gdk_event_get_time (event);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_printerr ("%s: gdk_device_grab(%s) failed with status %d\n",
|
||||
G_STRFUNC, gdk_device_get_name (device), status);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -114,11 +196,11 @@ gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (event != NULL);
|
||||
g_return_if_fail (shell->keyboard_grabbed == TRUE);
|
||||
g_return_if_fail (shell->grab_keyboard != NULL);
|
||||
|
||||
gdk_display_keyboard_ungrab (gtk_widget_get_display (shell->canvas),
|
||||
shell->keyboard_grab_time);
|
||||
gdk_device_ungrab (shell->grab_keyboard, shell->grab_keyboard_time);
|
||||
|
||||
shell->keyboard_grabbed = FALSE;
|
||||
shell->keyboard_grab_time = 0;
|
||||
shell->grab_keyboard = NULL;
|
||||
shell->grab_keyboard_source = NULL;
|
||||
shell->grab_keyboard_time = 0;
|
||||
}
|
||||
|
@@ -1017,8 +1017,7 @@ gimp_display_shell_monitor_res_notify_handler (GObject *config,
|
||||
{
|
||||
if (GIMP_DISPLAY_CONFIG (config)->monitor_res_from_gdk)
|
||||
{
|
||||
gimp_get_monitor_resolution (gtk_widget_get_screen (GTK_WIDGET (shell)),
|
||||
gimp_widget_get_monitor (GTK_WIDGET (shell)),
|
||||
gimp_get_monitor_resolution (gimp_widget_get_monitor (GTK_WIDGET (shell)),
|
||||
&shell->monitor_xres,
|
||||
&shell->monitor_yres);
|
||||
}
|
||||
|
@@ -116,7 +116,6 @@ layer_select_new (GimpDisplayShell *shell,
|
||||
GtkWidget *frame1;
|
||||
GtkWidget *frame2;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *alignment;
|
||||
|
||||
layer_select = g_slice_new0 (LayerSelect);
|
||||
|
||||
@@ -151,11 +150,7 @@ layer_select_new (GimpDisplayShell *shell,
|
||||
gtk_container_add (GTK_CONTAINER (frame2), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The view */
|
||||
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0);
|
||||
gtk_widget_show (alignment);
|
||||
|
||||
/* the view */
|
||||
layer_select->view =
|
||||
gimp_view_new_by_types (gimp_get_user_context (image->gimp),
|
||||
GIMP_TYPE_VIEW,
|
||||
@@ -165,9 +160,8 @@ layer_select_new (GimpDisplayShell *shell,
|
||||
gimp_display_shell_get_color_config (shell));
|
||||
gimp_view_set_viewable (GIMP_VIEW (layer_select->view),
|
||||
GIMP_VIEWABLE (layer));
|
||||
gtk_container_add (GTK_CONTAINER (alignment), layer_select->view);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), layer_select->view, FALSE, FALSE, 0);
|
||||
gtk_widget_show (layer_select->view);
|
||||
gtk_widget_show (alignment);
|
||||
|
||||
/* the layer name label */
|
||||
layer_select->label = gtk_label_new (gimp_object_get_name (layer));
|
||||
|
@@ -124,7 +124,7 @@ gimp_display_shell_rotate_dialog (GimpDisplayShell *shell)
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (shell->rotate_dialog),
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (shell->rotate_dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
@@ -155,8 +155,8 @@ gimp_display_shell_rotate_dialog (GimpDisplayShell *shell)
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
data->rotate_adj = (GtkAdjustment *)
|
||||
gtk_adjustment_new (shell->rotate_angle, 0.0, 360.0, 1, 15, 0);
|
||||
data->rotate_adj = gtk_adjustment_new (shell->rotate_angle,
|
||||
0.0, 360.0, 1, 15, 0);
|
||||
spin = gtk_spin_button_new (data->rotate_adj, 1.0, 2);
|
||||
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
|
||||
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin), TRUE);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user