Compare commits

...

45 Commits

Author SHA1 Message Date
Matthias Clasen
eb2c0e39c0 Updates for 3.4.2 2012-05-02 10:18:52 -04:00
Matthias Clasen
e146a3c421 Silence gtk-doc warnings 2012-05-02 08:55:46 -04:00
Matthias Clasen
7306695ba2 Add some more documentation about GDK_SCROLL_SMOOTH 2012-05-02 08:49:01 -04:00
Matthias Clasen
2f5a729b69 GtkGrid: Add a note about overlapping children
https://bugzilla.gnome.org/show_bug.cgi?id=669989
2012-05-02 08:47:46 -04:00
Cosimo Cecchi
3bc206c13e icontheme: search first in all themes if the requested icon is symbolic
Symbolic icons use a "-symbolic" suffix to distinguish themselves from
highcolor variants. Note that the dash character here has a different
meaning than the specificity level defined in the icon-naming-spec [1],
as it identifies a property of the icon itself.

Since they might be provided by a parent theme (e.g. the HighContrast theme
relies on the gnome icon theme for them), when we are looking up one we
should first escape the generic icon inheritance mechanism defined in the
icon-naming-spec [1], and privilege a symbolic icon, if it exists in a
parent theme, before applying the inheritance evaluation.

This fixes symbolic icons not working properly when used in the
HighContrast theme with the GTK_ICON_LOOKUP_GENERIC_FALLBACK flag set.

[1]
http://standards.freedesktop.org/icon-naming-spec/latest/ar01s03.html

https://bugzilla.gnome.org/show_bug.cgi?id=674806
2012-05-02 08:46:50 -04:00
Cosimo Cecchi
2b496e390f spinbutton: port to GtkIconHelper
Instead of doing our own lookup for symbolic icons and rendering the
pixbuf, use GtkIconHelper as other widgets do, which saves a bunch of
code.

https://bugzilla.gnome.org/show_bug.cgi?id=674807
2012-05-02 08:46:32 -04:00
Matthias Clasen
f28c50a182 Make page up/down work again in scrolled menus
This was broken since before GTK+ 3.0, when we replaced
a use of requisition by allocation. Fix this by using the
requisition height, that is already cached by the menu code.

The math is not quite right here; if you page all the way
down a long menu, you end up on the second-to-last menuitem.
But at least, page up/down let you move up and down the menu
again.
https://bugzilla.gnome.org/show_bug.cgi?id=668931
2012-05-02 08:46:10 -04:00
Ryan Lortie
336575a149 ./configure: fix error output for no -libXext
Due to the way the tests are structured, a missing libXext will give a
warning about a missing libX11 (even if libX11 is installed).  This is
confusing to people who are trying to build Gtk.

https://bugzilla.gnome.org/show_bug.cgi?id=674200
2012-05-02 08:44:28 -04:00
Marek Kasik
41f58738b2 printing: Localize loaded PPD files
Use ppdLocalize() to localize strings in loaded PPD file (#674326).
2012-05-02 08:44:17 -04:00
Alexander Larsson
16cb9a27a5 gtk-demo: Find gtk-demo-application.exe on win32
We need to append the ".exe" extension when looking for the
application file on windows.
2012-05-02 08:43:50 -04:00
Matthias Clasen
e3aae59ed7 Fix a cornercase of menu parsing
When a uimanager in a gtkbuilder file contains a menu,
the builder parser was getting confused.

https://bugzilla.gnome.org/show_bug.cgi?id=672789
2012-05-02 08:43:39 -04:00
Murray Cumming
73ae49ce85 GtkAppplication docs: Fix small typo. 2012-05-02 08:43:14 -04:00
Michael Vogt
02eef4951e GtkImage: Move g_clear_object() to gtk_image_finalize()
This moves the freeing of the icon_helper from the destory to the finalize
function to avoid segfaults when trying to access a destroyed object before it
is disposed. This often happens in signal handlers which get called
asynchronously after destroy.

https://bugzilla.gnome.org/show_bug.cgi?id=674050
2012-05-02 08:41:38 -04:00
Carlos Garnacho
d6fc987f2e treemodelsort: fix iter_previous so it can go back to the first item
It was getting the previous element, then checking whether it was the
first one, that has to be inverted so it doesn't stop on the second
item.

https://bugzilla.gnome.org/show_bug.cgi?id=674587
2012-05-01 13:38:12 +02:00
Ryan Lortie
ab2ce66856 GtkApplication: fix for NULL application ID
Deal with the possibility of a NULL application ID by updating our
copied logic from GLib: use a path of /org/gtk/Application/anonymous in
this case.

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:31:35 -04:00
Ryan Lortie
fa96610408 GtkApplication: fixes for NULL session bus
We currently have a couple of cases where GtkApplication assumes that
the session bus will be non-NULL causing critical error output or (in
the case of trying to publish menus) an infinite loop.

Three fixes:

 - if the session bus is NULL due to not having registered the
   GtkApplication yet then give a g_critical on the entry point to the
   menu setters instead of going into an infinite loop.  Document this.

 - check for NULL session bus even when calling the menu setters at the
   right time in order to prevent the infinite loop for
   non-programer-error cases (ie: because we had trouble connecting to
   the session bus)

 - check for NULL session bus when publishing the X11 properties on the
   GtkApplicationWindow and skip publishing them if we're not on the bus

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:31:32 -04:00
Richard Hughes
1aa7d8c546 Fix the colord support in GtkPrinterCups when the PPD is loaded async
If the PPD is not available when the printer is loaded then the PPD options are
not available and we can't get the correct qualifier to use with colord.

When the PPD becomes available, refresh the profile title to reflect reality.

https://bugzilla.gnome.org/show_bug.cgi?id=674890
2012-04-30 14:21:14 +01:00
Matthias Clasen
eb94f92f26 gtk-demo: fix the tool palette demo
The palette was confined to its minimal size, when in horizontal mode.
2012-04-27 08:31:35 -04:00
Benjamin Otte
67e2e41907 toolpalette: Configure adjustment properly
https://bugzilla.gnome.org/show_bug.cgi?id=673650
2012-04-27 03:38:25 +02:00
Benjamin Otte
27ff5516cc toolpalette: Rename variable
The variable that holds the total size for all widget allocations
shouldn't be called page_start.
2012-04-27 03:38:22 +02:00
Mark Vender
c64dafa88a Regenerate the gdk/gdkkeysyms.h and gdk/gdkkeysyms-compat.h files
https://bugzilla.gnome.org/show_bug.cgi?id=673259
2012-04-25 20:31:36 -04:00
Mark Vender
1919ad6529 Fix the gdk/gdkkeysyms-update.pl to reflect new upstream location
https://bugzilla.gnome.org/show_bug.cgi?id=673259
2012-04-25 20:31:35 -04:00
Sam Thursfield
60274b15f5 Fix build with XInput < 2.2
Fixes regression introduced in fa8e6f7857
2012-04-24 12:49:51 +01:00
Cosimo Cecchi
f016b55234 docs: add gtk_builder_add_from_resource() to gtk-doc 2012-04-23 17:42:55 -04:00
John Ralls
122e12bc5f Remove some more CUPS 1.2 ifdefs. 2012-04-23 14:37:46 -07:00
John Ralls
63b9487421 Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Fix up accesses of ipp structures in gtkcupsutils.c
2012-04-23 14:37:46 -07:00
John Ralls
4b3d566de1 Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Having refactored cups_request_printer_list_cb so that the cups
version-dependent block size is small enough to be handled in a single ifdef,
make the ifdef HAVE_CUPS_API_1_6 block.
2012-04-23 14:37:46 -07:00
John Ralls
595fce1406 Move some variable declarations into the scopes in which they're used. 2012-04-23 14:37:46 -07:00
John Ralls
8fa106dca6 Extract Function cups_create_printer 2012-04-23 14:37:46 -07:00
John Ralls
36fe2cafa6 Extract function cups_printer_handle_attribute 2012-04-23 14:37:46 -07:00
John Ralls
5903c5e47a Extract printer setup variables into a struct
So that it can be passed as a single parameter to functions as we
extract-function to make cups_request_printer_list_cb more manageable.

Note that not all of the affected variables are changed in this
changeset. Those are in extracted functions and will be addressed in the
next two changes.
2012-04-23 14:37:46 -07:00
John Ralls
c687883b20 Create enum PrinterStateLevel
Fixes "magic number" in printer_state_reason_level.
2012-04-23 14:37:46 -07:00
John Ralls
5f667f4d24 Extract reasons and reasons_desc arrays to file level
So that they can be used from more than one function. Rename them to avoid naming conflicts.
2012-04-23 14:37:46 -07:00
John Ralls
ee7adab87e Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
The first, simple changes. Turns off the deprecation warnings and substitutes macros and short ifdef blocks where feasible.
2012-04-23 14:37:46 -07:00
Cosimo Cecchi
37e3722d3a xi2: ignore extraneous events for smooth scroll
Since the event will be ignored anyway after it's translated (slave
devices are disabled), don't let it run in the smooth scroll code path,
as it will burn our caches for the actual event we're interested in.

https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:11:28 -04:00
Cosimo Cecchi
251ecd1177 xi2: fix thinko in variable type
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:11:20 -04:00
Matthias Clasen
fa8e6f7857 XI2: More logging for smooth scrolling
In addition to the delta, log device information.
This was triggered by
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:11:11 -04:00
Kristian Rietveld
49eb2f2b2c quartz: fix coordinates for synthesized event
Of course, we must pass coordinates in the NSWindow coordinate system
when creating an NSEvent. This fixes drag icon positioning and makes
the icon slide back to the correct position when the drag is
canceled.
2012-04-22 17:45:26 +02:00
Cosimo Cecchi
b202263efb messagedialog: also set GtkMisc alignment to zero for dialog labels
Setting xalign to START is not enough to make them left-aligned in every
case. This fixes a regression introduced in commit
cc0be1f949

https://bugzilla.gnome.org/show_bug.cgi?id=674286
2012-04-18 14:45:39 -04:00
Kristian Høgsberg
df69f49a44 wayland: Prefer X11 backend over Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=674102
2012-04-16 18:56:01 +02:00
Kalev Lember
9857c28e2b application-window: Move desktop file handling code to separate function
https://bugzilla.gnome.org/show_bug.cgi?id=674118
2012-04-16 19:23:34 +03:00
Reşat SABIQ
9082110835 Updated Crimean Tatar (Crimean Turkish) translation 2012-04-16 01:48:58 -05:00
Reşat SABIQ
0709c4b411 Updated Crimean Tatar (Crimean Turkish) translation 2012-04-16 01:40:07 -05:00
Reşat SABIQ
076a9f072c Updated Crimean Tatar (Crimean Turkish) translation 2012-04-16 01:40:07 -05:00
Yinghua Wang
d0f1b7abbd update Simplified Chinese (zh_CN) translation 2012-04-16 14:14:57 +08:00
32 changed files with 5913 additions and 5144 deletions

28
NEWS
View File

@@ -1,3 +1,31 @@
Overview of Changes in GTK+ 3.4.2
=================================
* Bug fixes:
673644 Scroll not working in document overview
671249 GApplication: Allow a null application_id?
668931 Scrolling down via PageDown/PageUp keys impossible in list...
669989 gtk_grid_attach(): Documentation doesn't mention multiple ...
670373 modules/printing/cups/gtkprintbackendcups.c won't build wi...
672789 gtk_builder_add_objects_from_file() crashes on GtkUIManage...
673259 The gdk/gdkkeysyms-update.pl script and the keysym files g...
673650 Evince 3.4: adding new annotation is not possible (pencil ...
674050 Free image->priv->icon_helper in gtk_image_finalize instea...
674102 Defaults to wayland over x11 backend
674118 application-window: Desktop file handling improvements
674200 ./configure gives wrong error message if -lXext is not ins...
674286 "Delete confirmation" dialog has wrong padding
674326 Use localizations of option names and values contained in ...
674587 treemodelsort: allow iter_previous() to go past the second...
674806 icontheme: search first in all themes if the requested ico...
674807 spinbutton: port to GtkIconHelper
674890 Fix the colord support in GtkPrinterCups when the PPD is l...
* Translation updates:
Simplified Chinese
Crimean Tatar
Overview of Changes in GTK+ 3.4.1
=================================

View File

@@ -78,7 +78,10 @@ Release notes for 3.4
* Scroll events have been separated from button events, and smooth
scrolling has been added with a separate event mask. Widgets now
need to have either GDK_SCROLL_MASK or GDK_SMOOTH_SCROLL_MASK in
their event mask to receive scroll events.
their event mask to receive scroll events. In addition, the
GdkScrollDirection enumeration has gained a new member,
GDK_SCROLL_SMOOTH, so switch statements will have to be amended
to cover this case.
* GTK+ now uses <Primary> instead of <Control> in keyboard accelerators,
for improved cross-platform handling. This should not affect

View File

@@ -961,9 +961,9 @@ if test "x$enable_x11_backend" = xyes; then
# Xext is optional, the chances a system has *none* of these things is so
# small that we just unconditionally require it.
AC_CHECK_FUNC(XOpenDisplay, :,
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
AC_CHECK_FUNC(XextFindDisplay, :,
AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
# Check for xReply
@@ -1394,6 +1394,12 @@ else
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -lt 2; then
AC_MSG_ERROR([CUPS >= 1.2 not found])
fi
if test $CUPS_API_MAJOR -gt 1 -o \
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
[Define to 1 if CUPS 1.6 API is available])
fi
AC_SUBST(CUPS_API_MAJOR)
AC_SUBST(CUPS_API_MINOR)

View File

@@ -427,6 +427,12 @@ on_name_vanished (GDBusConnection *connection,
}
}
#ifdef G_OS_WIN32
#define APP_EXTENSION ".exe"
#else
#define APP_EXTENSION
#endif
GtkWidget *
do_application (GtkWidget *toplevel)
{
@@ -445,8 +451,8 @@ do_application (GtkWidget *toplevel)
const gchar *command;
GError *error = NULL;
if (g_file_test ("./gtk3-demo-application", G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk3-demo-application";
if (g_file_test ("./gtk3-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk3-demo-application" APP_EXTENSION;
else
command = "gtk3-demo-application";

View File

@@ -522,6 +522,7 @@ do_toolpalette (GtkWidget *do_widget)
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_container_set_border_width (GTK_CONTAINER (palette_scroller), 6);
gtk_widget_set_hexpand (palette_scroller, TRUE);
gtk_container_add (GTK_CONTAINER (palette_scroller), palette);
gtk_container_add (GTK_CONTAINER (hbox), palette_scroller);

View File

@@ -526,6 +526,7 @@ GtkBuilderConnectFunc
GtkBuilderError
gtk_builder_new
gtk_builder_add_from_file
gtk_builder_add_from_resource
gtk_builder_add_from_string
gtk_builder_add_objects_from_file
gtk_builder_add_objects_from_string

View File

@@ -244,16 +244,16 @@ gdk_display_manager_get (void)
manager = g_object_new (gdk_win32_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_WAYLAND
if (backend == NULL || strcmp (backend, "wayland") == 0)
manager = g_object_new (gdk_wayland_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_X11
if (backend == NULL || strcmp (backend, "x11") == 0)
manager = g_object_new (gdk_x11_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_WAYLAND
if (backend == NULL || strcmp (backend, "wayland") == 0)
manager = g_object_new (gdk_wayland_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_BROADWAY
if (backend == NULL || strcmp (backend, "broadway") == 0)
manager = g_object_new (gdk_broadway_display_manager_get_type (), NULL);

View File

@@ -736,7 +736,8 @@ struct _GdkEventTouch
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType.
* @direction: the direction to scroll to (one of %GDK_SCROLL_UP,
* %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT and %GDK_SCROLL_RIGHT).
* %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT, %GDK_SCROLL_RIGHT or
* %GDK_SCROLL_SMOOTH).
* @device: the device where the event originated.
* @x_root: the x coordinate of the pointer relative to the root of the
* screen.
@@ -746,6 +747,11 @@ struct _GdkEventTouch
* Generated from button presses for the buttons 4 to 7. Wheel mice are
* usually configured to generate button press events for buttons 4 and 5
* when the wheel is turned.
*
* Some GDK backends can also generate 'smooth' scroll events, which
* can be recognized by the %GDK_SCROLL_SMOOTH scroll direction. For
* these, the scroll deltas can be obtained with
* gdk_event_get_scroll_deltas().
*/
struct _GdkEventScroll
{

View File

@@ -286,6 +286,7 @@
#define GDK_dead_U 0xfe89
#define GDK_dead_small_schwa 0xfe8a
#define GDK_dead_capital_schwa 0xfe8b
#define GDK_dead_greek 0xfe8c
#define GDK_First_Virtual_Screen 0xfed0
#define GDK_Prev_Virtual_Screen 0xfed1
#define GDK_Next_Virtual_Screen 0xfed2
@@ -332,6 +333,12 @@
#define GDK_Pointer_Accelerate 0xfefa
#define GDK_Pointer_DfltBtnNext 0xfefb
#define GDK_Pointer_DfltBtnPrev 0xfefc
#define GDK_ch 0xfea0
#define GDK_Ch 0xfea1
#define GDK_CH 0xfea2
#define GDK_c_h 0xfea3
#define GDK_C_h 0xfea4
#define GDK_C_H 0xfea5
#define GDK_3270_Duplicate 0xfd01
#define GDK_3270_FieldMark 0xfd02
#define GDK_3270_Right2 0xfd03
@@ -611,9 +618,9 @@
#define GDK_nacute 0x1f1
#define GDK_ncaron 0x1f2
#define GDK_odoubleacute 0x1f5
#define GDK_udoubleacute 0x1fb
#define GDK_rcaron 0x1f8
#define GDK_uring 0x1f9
#define GDK_udoubleacute 0x1fb
#define GDK_tcedilla 0x1fe
#define GDK_abovedot 0x1ff
#define GDK_Hstroke 0x2a1
@@ -674,32 +681,32 @@
#define GDK_uogonek 0x3f9
#define GDK_utilde 0x3fd
#define GDK_umacron 0x3fe
#define GDK_Wcircumflex 0x1000174
#define GDK_wcircumflex 0x1000175
#define GDK_Ycircumflex 0x1000176
#define GDK_ycircumflex 0x1000177
#define GDK_Babovedot 0x1001e02
#define GDK_babovedot 0x1001e03
#define GDK_Dabovedot 0x1001e0a
#define GDK_Wgrave 0x1001e80
#define GDK_Wacute 0x1001e82
#define GDK_dabovedot 0x1001e0b
#define GDK_Ygrave 0x1001ef2
#define GDK_Fabovedot 0x1001e1e
#define GDK_fabovedot 0x1001e1f
#define GDK_Mabovedot 0x1001e40
#define GDK_mabovedot 0x1001e41
#define GDK_Pabovedot 0x1001e56
#define GDK_wgrave 0x1001e81
#define GDK_pabovedot 0x1001e57
#define GDK_wacute 0x1001e83
#define GDK_Sabovedot 0x1001e60
#define GDK_ygrave 0x1001ef3
#define GDK_sabovedot 0x1001e61
#define GDK_Tabovedot 0x1001e6a
#define GDK_tabovedot 0x1001e6b
#define GDK_Wgrave 0x1001e80
#define GDK_wgrave 0x1001e81
#define GDK_Wacute 0x1001e82
#define GDK_wacute 0x1001e83
#define GDK_Wdiaeresis 0x1001e84
#define GDK_wdiaeresis 0x1001e85
#define GDK_sabovedot 0x1001e61
#define GDK_Wcircumflex 0x1000174
#define GDK_Tabovedot 0x1001e6a
#define GDK_Ycircumflex 0x1000176
#define GDK_wcircumflex 0x1000175
#define GDK_tabovedot 0x1001e6b
#define GDK_ycircumflex 0x1000177
#define GDK_Ygrave 0x1001ef2
#define GDK_ygrave 0x1001ef3
#define GDK_OE 0x13bc
#define GDK_oe 0x13bd
#define GDK_Ydiaeresis 0x13be
@@ -1194,6 +1201,7 @@
#define GDK_leftdoublequotemark 0xad2
#define GDK_rightdoublequotemark 0xad3
#define GDK_prescription 0xad4
#define GDK_permille 0xad5
#define GDK_minutes 0xad6
#define GDK_seconds 0xad7
#define GDK_latincross 0xad9
@@ -1627,6 +1635,8 @@
#define GDK_obarred 0x1000275
#define GDK_SCHWA 0x100018f
#define GDK_schwa 0x1000259
#define GDK_EZH 0x10001b7
#define GDK_ezh 0x1000292
#define GDK_Lbelowdot 0x1001e36
#define GDK_lbelowdot 0x1001e37
#define GDK_Abelowdot 0x1001ea0
@@ -2032,6 +2042,86 @@
#define GDK_braille_dots_1345678 0x10028fd
#define GDK_braille_dots_2345678 0x10028fe
#define GDK_braille_dots_12345678 0x10028ff
#define GDK_Sinh_ng 0x1000d82
#define GDK_Sinh_h2 0x1000d83
#define GDK_Sinh_a 0x1000d85
#define GDK_Sinh_aa 0x1000d86
#define GDK_Sinh_ae 0x1000d87
#define GDK_Sinh_aee 0x1000d88
#define GDK_Sinh_i 0x1000d89
#define GDK_Sinh_ii 0x1000d8a
#define GDK_Sinh_u 0x1000d8b
#define GDK_Sinh_uu 0x1000d8c
#define GDK_Sinh_ri 0x1000d8d
#define GDK_Sinh_rii 0x1000d8e
#define GDK_Sinh_lu 0x1000d8f
#define GDK_Sinh_luu 0x1000d90
#define GDK_Sinh_e 0x1000d91
#define GDK_Sinh_ee 0x1000d92
#define GDK_Sinh_ai 0x1000d93
#define GDK_Sinh_o 0x1000d94
#define GDK_Sinh_oo 0x1000d95
#define GDK_Sinh_au 0x1000d96
#define GDK_Sinh_ka 0x1000d9a
#define GDK_Sinh_kha 0x1000d9b
#define GDK_Sinh_ga 0x1000d9c
#define GDK_Sinh_gha 0x1000d9d
#define GDK_Sinh_ng2 0x1000d9e
#define GDK_Sinh_nga 0x1000d9f
#define GDK_Sinh_ca 0x1000da0
#define GDK_Sinh_cha 0x1000da1
#define GDK_Sinh_ja 0x1000da2
#define GDK_Sinh_jha 0x1000da3
#define GDK_Sinh_nya 0x1000da4
#define GDK_Sinh_jnya 0x1000da5
#define GDK_Sinh_nja 0x1000da6
#define GDK_Sinh_tta 0x1000da7
#define GDK_Sinh_ttha 0x1000da8
#define GDK_Sinh_dda 0x1000da9
#define GDK_Sinh_ddha 0x1000daa
#define GDK_Sinh_nna 0x1000dab
#define GDK_Sinh_ndda 0x1000dac
#define GDK_Sinh_tha 0x1000dad
#define GDK_Sinh_thha 0x1000dae
#define GDK_Sinh_dha 0x1000daf
#define GDK_Sinh_dhha 0x1000db0
#define GDK_Sinh_na 0x1000db1
#define GDK_Sinh_ndha 0x1000db3
#define GDK_Sinh_pa 0x1000db4
#define GDK_Sinh_pha 0x1000db5
#define GDK_Sinh_ba 0x1000db6
#define GDK_Sinh_bha 0x1000db7
#define GDK_Sinh_ma 0x1000db8
#define GDK_Sinh_mba 0x1000db9
#define GDK_Sinh_ya 0x1000dba
#define GDK_Sinh_ra 0x1000dbb
#define GDK_Sinh_la 0x1000dbd
#define GDK_Sinh_va 0x1000dc0
#define GDK_Sinh_sha 0x1000dc1
#define GDK_Sinh_ssha 0x1000dc2
#define GDK_Sinh_sa 0x1000dc3
#define GDK_Sinh_ha 0x1000dc4
#define GDK_Sinh_lla 0x1000dc5
#define GDK_Sinh_fa 0x1000dc6
#define GDK_Sinh_al 0x1000dca
#define GDK_Sinh_aa2 0x1000dcf
#define GDK_Sinh_ae2 0x1000dd0
#define GDK_Sinh_aee2 0x1000dd1
#define GDK_Sinh_i2 0x1000dd2
#define GDK_Sinh_ii2 0x1000dd3
#define GDK_Sinh_u2 0x1000dd4
#define GDK_Sinh_uu2 0x1000dd6
#define GDK_Sinh_ru2 0x1000dd8
#define GDK_Sinh_e2 0x1000dd9
#define GDK_Sinh_ee2 0x1000dda
#define GDK_Sinh_ai2 0x1000ddb
#define GDK_Sinh_o2 0x1000ddc
#define GDK_Sinh_oo2 0x1000ddd
#define GDK_Sinh_au2 0x1000dde
#define GDK_Sinh_lu2 0x1000ddf
#define GDK_Sinh_ruu2 0x1000df2
#define GDK_Sinh_luu2 0x1000df3
#define GDK_Sinh_kunddaliya 0x1000df4
#define GDK_ModeLock 0x1008ff01
#define GDK_MonBrightnessUp 0x1008ff02
#define GDK_MonBrightnessDown 0x1008ff03
@@ -2186,6 +2276,8 @@
#define GDK_Suspend 0x1008ffa7
#define GDK_Hibernate 0x1008ffa8
#define GDK_TouchpadToggle 0x1008ffa9
#define GDK_TouchpadOn 0x1008ffb0
#define GDK_TouchpadOff 0x1008ffb1
#define GDK_Switch_VT_1 0x1008fe01
#define GDK_Switch_VT_2 0x1008fe02
#define GDK_Switch_VT_3 0x1008fe03
@@ -2202,5 +2294,7 @@
#define GDK_ClearGrab 0x1008fe21
#define GDK_Next_VMode 0x1008fe22
#define GDK_Prev_VMode 0x1008fe23
#define GDK_LogWindowTree 0x1008fe24
#define GDK_LogGrabInfo 0x1008fe25
#endif /* __GDK_KEYSYMS_COMPAT_H__ */

View File

@@ -1,15 +1,15 @@
#!/usr/bin/env perl
# Updates http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms.h from upstream (X.org 7.x),
# from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
# Updates http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms.h from upstream (X.org 7.x),
# from http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
#
# Author : Simos Xenitellis <simos at gnome dot org>.
# Authos : Bastien Nocera <hadess@hadess.net>
# Version : 1.2
#
# Input : http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
# Input : http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h
# Output : http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms.h
# Input : http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
# Input : http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
# Output : http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms.h
#
# Notes : It downloads keysymdef.h from the Internet, if not found locally,
# Notes : and creates an updated gdkkeysyms.h
@@ -23,31 +23,31 @@ my @keysymelements;
if ( ! -f "keysymdef.h" )
{
print "Trying to download keysymdef.h from\n";
print "http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\n";
die "Unable to download keysymdef.h from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\n"
unless system("wget -c -O keysymdef.h \"http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\"") == 0;
print "http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\n";
die "Unable to download keysymdef.h from http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\n"
unless system("wget -c -O keysymdef.h \"http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\"") == 0;
print " done.\n\n";
}
else
{
print "We are using existing keysymdef.h found in this directory.\n";
print "It is assumed that you took care and it is a recent version\n";
print "as found at http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=keysymdef.h\n\n";
print "as found at http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\n\n";
}
if ( ! -f "XF86keysym.h" )
{
print "Trying to download XF86keysym.h from\n";
print "http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\n";
die "Unable to download keysymdef.h from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\n"
unless system("wget -c -O XF86keysym.h \"http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\"") == 0;
print "http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\n";
die "Unable to download keysymdef.h from http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\n"
unless system("wget -c -O XF86keysym.h \"http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\"") == 0;
print " done.\n\n";
}
else
{
print "We are using existing XF86keysym.h found in this directory.\n";
print "It is assumed that you took care and it is a recent version\n";
print "as found at http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=XF86keysym.h\n\n";
print "as found at http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\n\n";
}
if ( -f "gdkkeysyms.h" )
@@ -57,7 +57,7 @@ if ( -f "gdkkeysyms.h" )
die "Exiting...\n\n";
}
# Source: http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=keysymdef.h
# Source: http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
die "Could not open file keysymdef.h: $!\n" unless open(IN_KEYSYMDEF, "<:utf8", "keysymdef.h");
# Output: gtk+/gdk/gdkkeysyms.h
@@ -93,11 +93,11 @@ print OUT_GDKKEYSYMS_COMPAT $LICENSE_HEADER;
print OUT_GDKKEYSYMS<<EOF;
/*
* File auto-generated from script http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms-update.pl
* File auto-generated from script http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms-update.pl
* using the input file
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
* and
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
*/
/*
@@ -154,7 +154,7 @@ close IN_KEYSYMDEF;
#$gdksyms{"0"} = "0000";
# Source: http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=XF86keysym.h
# Source: http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
die "Could not open file XF86keysym.h: $!\n" unless open(IN_XF86KEYSYM, "<:utf8", "XF86keysym.h");
while (<IN_XF86KEYSYM>)

View File

@@ -18,11 +18,11 @@
/*
* File auto-generated from script http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms-update.pl
* File auto-generated from script http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms-update.pl
* using the input file
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
* and
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
*/
/*
@@ -295,6 +295,7 @@
#define GDK_KEY_dead_U 0xfe89
#define GDK_KEY_dead_small_schwa 0xfe8a
#define GDK_KEY_dead_capital_schwa 0xfe8b
#define GDK_KEY_dead_greek 0xfe8c
#define GDK_KEY_First_Virtual_Screen 0xfed0
#define GDK_KEY_Prev_Virtual_Screen 0xfed1
#define GDK_KEY_Next_Virtual_Screen 0xfed2
@@ -341,6 +342,12 @@
#define GDK_KEY_Pointer_Accelerate 0xfefa
#define GDK_KEY_Pointer_DfltBtnNext 0xfefb
#define GDK_KEY_Pointer_DfltBtnPrev 0xfefc
#define GDK_KEY_ch 0xfea0
#define GDK_KEY_Ch 0xfea1
#define GDK_KEY_CH 0xfea2
#define GDK_KEY_c_h 0xfea3
#define GDK_KEY_C_h 0xfea4
#define GDK_KEY_C_H 0xfea5
#define GDK_KEY_3270_Duplicate 0xfd01
#define GDK_KEY_3270_FieldMark 0xfd02
#define GDK_KEY_3270_Right2 0xfd03
@@ -620,9 +627,9 @@
#define GDK_KEY_nacute 0x1f1
#define GDK_KEY_ncaron 0x1f2
#define GDK_KEY_odoubleacute 0x1f5
#define GDK_KEY_udoubleacute 0x1fb
#define GDK_KEY_rcaron 0x1f8
#define GDK_KEY_uring 0x1f9
#define GDK_KEY_udoubleacute 0x1fb
#define GDK_KEY_tcedilla 0x1fe
#define GDK_KEY_abovedot 0x1ff
#define GDK_KEY_Hstroke 0x2a1
@@ -683,32 +690,32 @@
#define GDK_KEY_uogonek 0x3f9
#define GDK_KEY_utilde 0x3fd
#define GDK_KEY_umacron 0x3fe
#define GDK_KEY_Wcircumflex 0x1000174
#define GDK_KEY_wcircumflex 0x1000175
#define GDK_KEY_Ycircumflex 0x1000176
#define GDK_KEY_ycircumflex 0x1000177
#define GDK_KEY_Babovedot 0x1001e02
#define GDK_KEY_babovedot 0x1001e03
#define GDK_KEY_Dabovedot 0x1001e0a
#define GDK_KEY_Wgrave 0x1001e80
#define GDK_KEY_Wacute 0x1001e82
#define GDK_KEY_dabovedot 0x1001e0b
#define GDK_KEY_Ygrave 0x1001ef2
#define GDK_KEY_Fabovedot 0x1001e1e
#define GDK_KEY_fabovedot 0x1001e1f
#define GDK_KEY_Mabovedot 0x1001e40
#define GDK_KEY_mabovedot 0x1001e41
#define GDK_KEY_Pabovedot 0x1001e56
#define GDK_KEY_wgrave 0x1001e81
#define GDK_KEY_pabovedot 0x1001e57
#define GDK_KEY_wacute 0x1001e83
#define GDK_KEY_Sabovedot 0x1001e60
#define GDK_KEY_ygrave 0x1001ef3
#define GDK_KEY_sabovedot 0x1001e61
#define GDK_KEY_Tabovedot 0x1001e6a
#define GDK_KEY_tabovedot 0x1001e6b
#define GDK_KEY_Wgrave 0x1001e80
#define GDK_KEY_wgrave 0x1001e81
#define GDK_KEY_Wacute 0x1001e82
#define GDK_KEY_wacute 0x1001e83
#define GDK_KEY_Wdiaeresis 0x1001e84
#define GDK_KEY_wdiaeresis 0x1001e85
#define GDK_KEY_sabovedot 0x1001e61
#define GDK_KEY_Wcircumflex 0x1000174
#define GDK_KEY_Tabovedot 0x1001e6a
#define GDK_KEY_Ycircumflex 0x1000176
#define GDK_KEY_wcircumflex 0x1000175
#define GDK_KEY_tabovedot 0x1001e6b
#define GDK_KEY_ycircumflex 0x1000177
#define GDK_KEY_Ygrave 0x1001ef2
#define GDK_KEY_ygrave 0x1001ef3
#define GDK_KEY_OE 0x13bc
#define GDK_KEY_oe 0x13bd
#define GDK_KEY_Ydiaeresis 0x13be
@@ -1203,6 +1210,7 @@
#define GDK_KEY_leftdoublequotemark 0xad2
#define GDK_KEY_rightdoublequotemark 0xad3
#define GDK_KEY_prescription 0xad4
#define GDK_KEY_permille 0xad5
#define GDK_KEY_minutes 0xad6
#define GDK_KEY_seconds 0xad7
#define GDK_KEY_latincross 0xad9
@@ -1636,6 +1644,8 @@
#define GDK_KEY_obarred 0x1000275
#define GDK_KEY_SCHWA 0x100018f
#define GDK_KEY_schwa 0x1000259
#define GDK_KEY_EZH 0x10001b7
#define GDK_KEY_ezh 0x1000292
#define GDK_KEY_Lbelowdot 0x1001e36
#define GDK_KEY_lbelowdot 0x1001e37
#define GDK_KEY_Abelowdot 0x1001ea0
@@ -2293,5 +2303,7 @@
#define GDK_KEY_ClearGrab 0x1008fe21
#define GDK_KEY_Next_VMode 0x1008fe22
#define GDK_KEY_Prev_VMode 0x1008fe23
#define GDK_KEY_LogWindowTree 0x1008fe24
#define GDK_KEY_LogGrabInfo 0x1008fe25
#endif /* __GDK_KEYSYMS_H__ */

View File

@@ -1062,7 +1062,7 @@ scroll_valuators_changed (GdkX11DeviceXI2 *device,
gdouble *dx,
gdouble *dy)
{
gdouble has_scroll_valuators = FALSE;
gboolean has_scroll_valuators = FALSE;
GdkScrollDirection direction;
guint n_axes, i, n_val;
gdouble *vals;
@@ -1305,20 +1305,37 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
case XI_Motion:
{
XIDeviceEvent *xev = (XIDeviceEvent *) ev;
GdkDevice *source_device;
GdkDevice *source_device, *device;
gdouble delta_x, delta_y;
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->deviceid));
if (scroll_valuators_changed (GDK_X11_DEVICE_XI2 (source_device),
/* When scrolling, X might send events twice here; once with both the
* device and the source device set to the physical device, and once
* with the device set to the master device.
* Since we are only interested in the latter, and
* scroll_valuators_changed() updates the valuator cache for the
* source device, we need to explicitly ignore the first event in
* order to get the correct delta for the second.
*/
if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE &&
scroll_valuators_changed (GDK_X11_DEVICE_XI2 (source_device),
&xev->valuators, &delta_x, &delta_y))
{
event->scroll.type = GDK_SCROLL;
event->scroll.direction = GDK_SCROLL_SMOOTH;
GDK_NOTE(EVENTS,
g_message ("smooth scroll:\twindow %ld\n\tdeltas: %f %f",
g_message ("smooth scroll: %s\n\tdevice: %u\n\tsource device: %u\n\twindow %ld\n\tdeltas: %f %f",
#ifdef XINPUT_2_2
(xev->flags & XIPointerEmulated) ? "emulated" : "",
#else
"",
#endif
xev->deviceid, xev->sourceid,
xev->event, delta_x, delta_y));
@@ -1331,9 +1348,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->scroll.delta_x = delta_x;
event->scroll.delta_y = delta_y;
event->scroll.device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->deviceid));
event->scroll.device = device;
gdk_event_set_source_device (event, source_device);
event->scroll.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
@@ -1348,9 +1363,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->motion.x_root = (gdouble) xev->root_x;
event->motion.y_root = (gdouble) xev->root_y;
event->motion.device = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (xev->deviceid));
event->motion.device = device;
gdk_event_set_source_device (event, source_device);
event->motion.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);

View File

@@ -185,6 +185,9 @@ gtk_application_x11_publish_menu (GtkApplication *application,
{
gint i;
if (application->priv->session_bus == NULL)
return;
/* unexport any existing menu */
if (*id)
{
@@ -276,6 +279,9 @@ object_path_from_appid (const gchar *appid)
{
gchar *appid_path, *iter;
if (appid == NULL)
return g_strdup ("/org/gtk/Application/anonymous");
appid_path = g_strconcat ("/", appid, NULL);
for (iter = appid_path; *iter; iter++)
{
@@ -820,7 +826,7 @@ gtk_application_new (const gchar *application_id,
* @application: a #GtkApplication
* @window: a #GtkWindow
*
* Adds a window from @application.
* Adds a window to @application.
*
* This call is equivalent to setting the #GtkWindow:application
* property of @window to @application.
@@ -999,6 +1005,10 @@ gtk_application_remove_accelerator (GtkApplication *application,
*
* Sets or unsets the application menu for @application.
*
* This can only be done in the primary instance of the application,
* after it has been registered. #GApplication:startup is a good place
* to call this.
*
* The application menu is a single menu containing items that typically
* impact the application as a whole, rather than acting on a specific
* window or document. For example, you would expect to see
@@ -1008,8 +1018,6 @@ gtk_application_remove_accelerator (GtkApplication *application,
* If supported, the application menu will be rendered by the desktop
* environment.
*
* You might call this method in your #GApplication:startup signal handler.
*
* Use the base #GActionMap interface to add actions, to respond to the user
* selecting these menu items.
*
@@ -1020,6 +1028,8 @@ gtk_application_set_app_menu (GtkApplication *application,
GMenuModel *app_menu)
{
g_return_if_fail (GTK_IS_APPLICATION (application));
g_return_if_fail (g_application_get_is_registered (G_APPLICATION (application)));
g_return_if_fail (!g_application_get_is_remote (G_APPLICATION (application)));
if (app_menu != application->priv->app_menu)
{
@@ -1069,6 +1079,10 @@ gtk_application_get_app_menu (GtkApplication *application)
*
* This is a menubar in the traditional sense.
*
* This can only be done in the primary instance of the application,
* after it has been registered. #GApplication:startup is a good place
* to call this.
*
* Depending on the desktop environment, this may appear at the top of
* each window, or at the top of the screen. In some environments, if
* both the application menu and the menubar are set, the application
@@ -1077,8 +1091,6 @@ gtk_application_get_app_menu (GtkApplication *application)
* example, the application menu may be rendered by the desktop shell
* while the menubar (if set) remains in each individual window.
*
* You might call this method in your #GApplication:startup signal handler.
*
* Use the base #GActionMap interface to add actions, to respond to the user
* selecting these menu items.
*
@@ -1089,6 +1101,8 @@ gtk_application_set_menubar (GtkApplication *application,
GMenuModel *menubar)
{
g_return_if_fail (GTK_IS_APPLICATION (application));
g_return_if_fail (g_application_get_is_registered (G_APPLICATION (application)));
g_return_if_fail (!g_application_get_is_remote (G_APPLICATION (application)));
if (menubar != application->priv->menubar)
{

View File

@@ -257,6 +257,32 @@ gtk_application_window_update_menubar (GtkApplicationWindow *window)
}
}
static gchar *
gtk_application_window_get_app_desktop_name ()
{
gchar *retval = NULL;
#ifdef HAVE_GIO_UNIX
GDesktopAppInfo *app_info;
const gchar *app_name = NULL;
gchar *desktop_file;
desktop_file = g_strconcat (g_get_prgname (), ".desktop", NULL);
app_info = g_desktop_app_info_new (desktop_file);
g_free (desktop_file);
if (app_info != NULL)
app_name = g_app_info_get_name (G_APP_INFO (app_info));
if (app_name != NULL)
retval = g_strdup (app_name);
g_clear_object (&app_info);
#endif /* HAVE_GIO_UNIX */
return retval;
}
static void
gtk_application_window_update_shell_shows_app_menu (GtkApplicationWindow *window,
GtkSettings *settings)
@@ -282,33 +308,25 @@ gtk_application_window_update_shell_shows_app_menu (GtkApplicationWindow *window
if (app_menu != NULL)
{
const gchar *name;
GDesktopAppInfo *app_info = NULL;
const gchar *app_name;
gchar *name;
name = g_get_application_name ();
if (name == g_get_prgname ())
app_name = g_get_application_name ();
if (app_name != g_get_prgname ())
{
const gchar *app_name = NULL;
#ifdef HAVE_GIO_UNIX
gchar *desktop_name;
desktop_name = g_strconcat (name, ".desktop", NULL);
app_info = g_desktop_app_info_new (desktop_name);
if (app_info != NULL)
app_name = g_app_info_get_name (G_APP_INFO (app_info));
g_free (desktop_name);
#endif /* HAVE_GIO_UNIX */
if (app_name != NULL &&
g_strcmp0 (app_name, name) != 0)
name = app_name;
else
name = _("Application");
/* the app has set its application name, use it */
name = g_strdup (app_name);
}
else
{
/* get the name from .desktop file */
name = gtk_application_window_get_app_desktop_name ();
if (name == NULL)
name = g_strdup (_("Application"));
}
g_menu_append_submenu (window->priv->app_menu_section, name, app_menu);
g_clear_object (&app_info);
g_free (name);
}
}
}
@@ -750,7 +768,7 @@ gtk_application_window_real_realize (GtkWidget *widget)
gdkwindow = gtk_widget_get_window (GTK_WIDGET (window));
if (GDK_IS_X11_WINDOW (gdkwindow))
if (GDK_IS_X11_WINDOW (gdkwindow) && window->priv->session)
{
gdk_x11_window_set_utf8_property (gdkwindow, "_GTK_APPLICATION_ID",
g_application_get_application_id (G_APPLICATION (application)));

View File

@@ -963,15 +963,15 @@ end_element (GMarkupParseContext *context,
else if (strcmp (element_name, "interface") == 0)
{
}
else if (strcmp (element_name, "menu") == 0)
{
_gtk_builder_menu_end (data);
}
else if (data->requested_objects && !data->inside_requested_object)
{
/* If outside a requested object, simply ignore this tag */
return;
}
else if (strcmp (element_name, "menu") == 0)
{
_gtk_builder_menu_end (data);
}
else if (strcmp (element_name, "object") == 0)
{
ObjectInfo *object_info = state_pop_info (data, ObjectInfo);

View File

@@ -1090,7 +1090,7 @@ gtk_drag_begin_idle (gpointer arg)
[nswindow dragImage:drag_image
at:point
offset:NSMakeSize(0, 0)
offset:NSZeroSize
event:info->nsevent
pasteboard:pasteboard
source:nswindow
@@ -1134,8 +1134,25 @@ gtk_drag_begin_internal (GtkWidget *widget,
{
if (gdk_event_get_coords (event, &x, &y))
{
/* We need to translate (x, y) to coordinates relative to the
* toplevel GdkWindow, which should be the GdkWindow backing
* nswindow. Then, we convert to the NSWindow coordinate system.
*/
GdkWindow *window = event->any.window;
GdkWindow *toplevel = gdk_window_get_effective_toplevel (window);
while (window != toplevel)
{
double old_x = x;
double old_y = y;
gdk_window_coords_to_parent (window, old_x, old_y,
&x, &y);
window = gdk_window_get_effective_parent (window);
}
point.x = x;
point.y = y;
point.y = gdk_window_get_height (window) - y;
}
time = (double)gdk_event_get_time (event);
}

View File

@@ -42,7 +42,8 @@
*
* Children are added using gtk_grid_attach(). They can span multiple
* rows or columns. It is also possible to add a child next to an
* existing child, using gtk_grid_attach_next_to().
* existing child, using gtk_grid_attach_next_to(). The behaviour of
* GtkGrid when several children occupy the same grid cell is undefined.
*
* GtkGrid can be used like a #GtkBox by just using gtk_container_add(),
* which will place children next to each other in the direction determined

View File

@@ -1331,6 +1331,23 @@ choose_icon (GtkIconTheme *icon_theme,
ensure_valid_themes (icon_theme);
/* for symbolic icons, do a search in all registered themes first;
* a theme that inherits them from a parent theme might provide
* an alternative highcolor version, but still expect the symbolic icon
* to show up instead.
*/
if (icon_names[0] &&
g_str_has_suffix (icon_names[0], "-symbolic"))
{
for (l = priv->themes; l; l = l->next)
{
IconTheme *theme = l->data;
icon_info = theme_lookup_icon (theme, icon_names[0], size, allow_svg, use_builtin);
if (icon_info)
goto out;
}
}
for (l = priv->themes; l; l = l->next)
{
IconTheme *theme = l->data;

View File

@@ -157,7 +157,7 @@ static void gtk_image_get_preferred_height (GtkWidget *widget,
static void gtk_image_style_updated (GtkWidget *widget);
static void gtk_image_screen_changed (GtkWidget *widget,
GdkScreen *prev_screen);
static void gtk_image_destroy (GtkWidget *widget);
static void gtk_image_finalize (GObject *object);
static void gtk_image_reset (GtkImage *image);
static void gtk_image_set_property (GObject *object,
@@ -199,10 +199,10 @@ gtk_image_class_init (GtkImageClass *class)
gobject_class->set_property = gtk_image_set_property;
gobject_class->get_property = gtk_image_get_property;
gobject_class->finalize = gtk_image_finalize;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->draw = gtk_image_draw;
widget_class->destroy = gtk_image_destroy;
widget_class->get_preferred_width = gtk_image_get_preferred_width;
widget_class->get_preferred_height = gtk_image_get_preferred_height;
widget_class->unmap = gtk_image_unmap;
@@ -359,14 +359,14 @@ gtk_image_init (GtkImage *image)
}
static void
gtk_image_destroy (GtkWidget *widget)
gtk_image_finalize (GObject *object)
{
GtkImage *image = GTK_IMAGE (widget);
GtkImage *image = GTK_IMAGE (object);
g_clear_object (&image->priv->icon_helper);
GTK_WIDGET_CLASS (gtk_image_parent_class)->destroy (widget);
}
G_OBJECT_CLASS (gtk_image_parent_class)->finalize (object);
};
static void
gtk_image_set_property (GObject *object,

View File

@@ -5528,15 +5528,13 @@ static gint
get_menu_height (GtkMenu *menu)
{
GtkMenuPrivate *priv = menu->priv;
GtkAllocation allocation;
GtkWidget *widget = GTK_WIDGET (menu);
GtkBorder padding;
gint height;
gtk_widget_get_allocation (widget, &allocation);
get_menu_padding (widget, &padding);
height = allocation.height;
height = priv->requested_height;
height -= (gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2) +
padding.top + padding.bottom;
@@ -5600,6 +5598,7 @@ gtk_menu_real_move_scroll (GtkMenu *menu,
GtkWidget *new_child;
gboolean new_upper_arrow_visible = priv->upper_arrow_visible && !priv->tearoff_active;
GtkBorder arrow_border;
get_arrows_border (menu, &arrow_border);
if (priv->scroll_offset != old_offset)
@@ -5616,13 +5615,11 @@ gtk_menu_real_move_scroll (GtkMenu *menu,
case GTK_SCROLL_START:
/* Ignore the enter event we might get if the pointer is on the menu */
menu_shell->priv->ignore_enter = TRUE;
gtk_menu_scroll_to (menu, 0);
gtk_menu_shell_select_first (menu_shell, TRUE);
break;
case GTK_SCROLL_END:
/* Ignore the enter event we might get if the pointer is on the menu */
menu_shell->priv->ignore_enter = TRUE;
gtk_menu_scroll_to (menu, end_position - page_size);
_gtk_menu_shell_select_last (menu_shell, TRUE);
break;
default:

View File

@@ -350,6 +350,9 @@ gtk_message_dialog_init (GtkMessageDialog *dialog)
gtk_widget_set_halign (priv->secondary_label, GTK_ALIGN_START);
gtk_widget_set_valign (priv->secondary_label, GTK_ALIGN_START);
gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.0);
gtk_misc_set_alignment (GTK_MISC (priv->secondary_label), 0.0, 0.0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
priv->message_area = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);

View File

@@ -768,7 +768,6 @@ gtk_socket_add_grabbed_key (GtkSocket *socket,
/**
* gtk_socket_remove_grabbed_key:
*
* @socket: a #GtkSocket
* @keyval: a key
* @modifiers: modifiers for the key
@@ -1160,7 +1159,6 @@ gtk_socket_handle_map_request (GtkSocket *socket)
/**
* gtk_socket_unmap_notify:
*
* @socket: a #GtkSocket
*
* Called from the GtkSocket backend when the plug has been unmapped ???

View File

@@ -38,6 +38,7 @@
#include "gtkadjustment.h"
#include "gtkbindings.h"
#include "gtkentryprivate.h"
#include "gtkiconhelperprivate.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
@@ -606,49 +607,6 @@ gtk_spin_button_get_property (GObject *object,
}
}
static gint
get_icon_size (void)
{
gint width, height, icon_size;
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height);
icon_size = MAX (width, height);
return icon_size;
}
static GdkPixbuf *
create_one_pixbuf (GtkStyleContext *context,
const gchar *icon_name)
{
GtkIconInfo *icon_info;
GdkPixbuf *pix;
gint size = get_icon_size ();
icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (),
icon_name, size,
GTK_ICON_LOOKUP_GENERIC_FALLBACK |
GTK_ICON_LOOKUP_USE_BUILTIN);
if (icon_info != NULL)
{
pix = gtk_icon_info_load_symbolic_for_context (icon_info, context,
NULL, NULL);
gtk_icon_info_free (icon_info);
}
else
{
GtkIconSet *icon_set;
icon_set = gtk_style_context_lookup_icon_set (context, GTK_STOCK_MISSING_IMAGE);
pix = gtk_icon_set_render_icon_pixbuf (icon_set, context, GTK_ICON_SIZE_MENU);
g_warning ("Unable to fetch icon %s from the icon theme", icon_name);
}
return pix;
}
static void
gtk_spin_button_init (GtkSpinButton *spin_button)
{
@@ -861,6 +819,10 @@ gtk_spin_button_panel_get_width (GtkSpinButton *spin_button,
GtkBorder button_padding, button_border;
GtkStyleContext *context;
GtkStateFlags state;
gint icon_size, width, height;
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height);
icon_size = MAX (width, height);
context = gtk_spin_button_panel_get_context (spin_button, panel);
state = gtk_spin_button_panel_get_state (spin_button, panel);
@@ -870,7 +832,7 @@ gtk_spin_button_panel_get_width (GtkSpinButton *spin_button,
g_object_unref (context);
return get_icon_size () + button_padding.left + button_padding.right +
return icon_size + button_padding.left + button_padding.right +
button_border.left + button_border.right;
}
@@ -936,7 +898,8 @@ gtk_spin_button_panel_draw (GtkSpinButton *spin_button,
GtkStateFlags state;
GtkWidget *widget;
gdouble width, height, x, y;
GdkPixbuf *pix;
gint icon_width, icon_height;
GtkIconHelper *icon_helper;
widget = GTK_WIDGET (spin_button);
@@ -950,24 +913,30 @@ gtk_spin_button_panel_draw (GtkSpinButton *spin_button,
height = gdk_window_get_height (panel);
width = gdk_window_get_width (panel);
icon_helper = _gtk_icon_helper_new ();
_gtk_icon_helper_set_use_fallback (icon_helper, TRUE);
if (panel == priv->down_panel)
pix = create_one_pixbuf (context, "list-remove-symbolic");
_gtk_icon_helper_set_icon_name (icon_helper, "list-remove-symbolic", GTK_ICON_SIZE_MENU);
else
pix = create_one_pixbuf (context, "list-add-symbolic");
_gtk_icon_helper_set_icon_name (icon_helper, "list-add-symbolic", GTK_ICON_SIZE_MENU);
_gtk_icon_helper_get_size (icon_helper, context,
&icon_width, &icon_height);
gtk_render_background (context, cr,
0, 0, width, height);
gtk_render_frame (context, cr,
0, 0, width, height);
x = floor ((width - gdk_pixbuf_get_width (pix)) / 2.0);
y = floor ((height - gdk_pixbuf_get_height (pix)) / 2.0);
x = floor ((width - icon_width) / 2.0);
y = floor ((height - icon_height) / 2.0);
gtk_render_icon (context, cr, pix,
x, y);
_gtk_icon_helper_draw (icon_helper, context, cr,
x, y);
cairo_restore (cr);
g_object_unref (pix);
g_object_unref (icon_helper);
g_object_unref (context);
}

View File

@@ -473,7 +473,7 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
gint remaining_space = 0;
gint expand_space = 0;
gint page_start, page_size = 0;
gint total_size, page_size;
gint offset = 0;
guint i;
guint border_width;
@@ -652,43 +652,40 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
child_allocation.y += border_width;
child_allocation.y += offset;
page_start = child_allocation.y;
total_size = child_allocation.y;
}
else
{
x += border_width;
x += offset;
page_start = x;
total_size = x;
}
/* update the scrollbar to match the displayed adjustment */
if (adjustment)
{
gdouble value, lower, upper;
gdouble lower, upper;
total_size = MAX (0, total_size);
page_size = MIN (total_size, page_size);
if (GTK_ORIENTATION_VERTICAL == palette->priv->orientation ||
GTK_TEXT_DIR_LTR == direction)
{
lower = 0;
upper = MAX (0, page_start);
value = MIN (offset, upper - page_size);
gtk_adjustment_clamp_page (adjustment, value, offset + page_size);
upper = total_size;
}
else
{
lower = page_size - MAX (0, page_start);
lower = page_size - total_size;
upper = page_size;
offset = -offset;
value = MAX (offset, lower);
gtk_adjustment_clamp_page (adjustment, offset, value + page_size);
}
gtk_adjustment_configure (adjustment,
value,
offset,
lower,
upper,
page_size * 0.1,

View File

@@ -1406,12 +1406,13 @@ gtk_tree_model_sort_iter_previous (GtkTreeModel *tree_model,
elt = iter->user_data2;
siter = g_sequence_iter_prev (elt->siter);
if (g_sequence_iter_is_begin (siter))
if (g_sequence_iter_is_begin (elt->siter))
{
iter->stamp = 0;
return FALSE;
}
siter = g_sequence_iter_prev (elt->siter);
iter->user_data2 = GET_ELT (siter);
return TRUE;

View File

@@ -1113,6 +1113,64 @@ specific_bug_364946 (void)
gtk_tree_model_sort_clear_cache (GTK_TREE_MODEL_SORT (s_model));
}
static void
iter_test (GtkTreeModel *model)
{
GtkTreeIter a, b;
g_assert (gtk_tree_model_get_iter_first (model, &a));
g_assert (gtk_tree_model_iter_next (model, &a));
g_assert (gtk_tree_model_iter_next (model, &a));
b = a;
g_assert (!gtk_tree_model_iter_next (model, &b));
g_assert (gtk_tree_model_iter_previous (model, &a));
g_assert (gtk_tree_model_iter_previous (model, &a));
b = a;
g_assert (!gtk_tree_model_iter_previous (model, &b));
}
static void
specific_bug_674587 (void)
{
GtkListStore *l;
GtkTreeStore *t;
GtkTreeModel *m;
GtkTreeIter a;
l = gtk_list_store_new (1, G_TYPE_STRING);
gtk_list_store_append (l, &a);
gtk_list_store_set (l, &a, 0, "0", -1);
gtk_list_store_append (l, &a);
gtk_list_store_set (l, &a, 0, "1", -1);
gtk_list_store_append (l, &a);
gtk_list_store_set (l, &a, 0, "2", -1);
iter_test (GTK_TREE_MODEL (l));
g_object_unref (l);
t = gtk_tree_store_new (1, G_TYPE_STRING);
gtk_tree_store_append (t, &a, NULL);
gtk_tree_store_set (t, &a, 0, "0", -1);
gtk_tree_store_append (t, &a, NULL);
gtk_tree_store_set (t, &a, 0, "1", -1);
gtk_tree_store_append (t, &a, NULL);
gtk_tree_store_set (t, &a, 0, "2", -1);
iter_test (GTK_TREE_MODEL (t));
m = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (t));
iter_test (m);
g_object_unref (t);
g_object_unref (m);
}
/* main */
void
@@ -1146,4 +1204,7 @@ register_sort_model_tests (void)
specific_bug_300089);
g_test_add_func ("/TreeModelSort/specific/bug-364946",
specific_bug_364946);
g_test_add_func ("/TreeModelSort/specific/bug-674587",
specific_bug_674587);
}

View File

@@ -81,6 +81,14 @@ static GtkCupsRequestStateFunc get_states[] = {
_get_read_data
};
#ifndef HAVE_CUPS_API_1_6
#define ippSetOperation(ipp_request, ipp_op_id) ipp_request->request.op.operation_id = ipp_op_id
#define ippSetRequestId(ipp_request, ipp_rq_id) ipp_request->request.op.request_id = ipp_rq_id
#define ippSetState(ipp_request, ipp_state) ipp_request->state = ipp_state
#define ippGetString(attr, index, foo) attr->values[index].string.text
#define ippGetCount(attr) attr->num_values
#endif
static void
gtk_cups_result_set_error (GtkCupsResult *result,
GtkCupsErrorType error_type,
@@ -163,8 +171,8 @@ gtk_cups_request_new_with_username (http_t *connection,
request->data_io = data_io;
request->ipp_request = ippNew ();
request->ipp_request->request.op.operation_id = operation_id;
request->ipp_request->request.op.request_id = 1;
ippSetOperation (request->ipp_request, operation_id);
ippSetRequestId (request->ipp_request, 1);
language = cupsLangDefault ();
@@ -353,8 +361,8 @@ gtk_cups_request_ipp_get_string (GtkCupsRequest *request,
name,
tag);
if (attribute != NULL && attribute->values != NULL)
return attribute->values[0].string.text;
if (attribute != NULL && ippGetCount (attribute) > 0)
return ippGetString (attribute, 0, NULL);
else
return NULL;
}
@@ -732,7 +740,7 @@ _post_send (GtkCupsRequest *request)
request->attempts = 0;
request->state = GTK_CUPS_POST_WRITE_REQUEST;
request->ipp_request->state = IPP_IDLE;
ippSetState (request->ipp_request, IPP_IDLE);
}
static void
@@ -1221,7 +1229,7 @@ _get_send (GtkCupsRequest *request)
request->state = GTK_CUPS_GET_CHECK;
request->poll_state = GTK_CUPS_HTTP_READ;
request->ipp_request->state = IPP_IDLE;
ippSetState (request->ipp_request, IPP_IDLE);
}
static void

File diff suppressed because it is too large Load Diff

View File

@@ -504,6 +504,15 @@ colord_client_connect_cb (GObject *source_object,
g_object_unref (printer);
}
static void
colord_printer_details_aquired_cb (GtkPrinterCups *printer,
gboolean success,
gpointer user_data)
{
/* refresh the device */
colord_update_device (printer);
}
#endif
/**
@@ -549,6 +558,11 @@ gtk_printer_cups_new (const char *name,
colord_client_connect_cb,
g_object_ref (printer));
}
/* update the device when we read the PPD */
g_signal_connect (printer, "details-acquired",
G_CALLBACK (colord_printer_details_aquired_cb),
printer);
#endif
return printer;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3154
po/crh.po

File diff suppressed because it is too large Load Diff