Compare commits

...

13 Commits

Author SHA1 Message Date
Matthias Clasen
f05eac610a Merge branch 'places_view_button_labels' into 'main'
gtkplacesview: Add some missing button tooltips

See merge request GNOME/gtk!7927
2024-11-15 15:51:38 +00:00
Sveinn í Felli
4e8eeba5bb Update Icelandic translation
(cherry picked from commit d07a62a940)
2024-11-15 15:25:16 +00:00
Lukáš Tyrychtr
6da8fcf5d9 gtkplacesview: Add some missing button tooltips
The remove server button and the server list one had only icons,
so fix it by adding tooltips to them.
2024-11-15 15:27:04 +01:00
Matthias Clasen
a34e95bc39 Merge branch 'for-main' into 'main'
surface: Add debug spew for color states

See merge request GNOME/gtk!7924
2024-11-14 23:04:07 +00:00
Matthias Clasen
ed2716f9ce inspector: Put surfaces and renderers in the tree
These are otherwise really hard to navigate to, and we already
have plenty of non-widget objects in the tree.
2024-11-14 16:58:44 -05:00
Matthias Clasen
841bd9c5c2 inspector: Avoid a critical 2024-11-14 16:09:45 -05:00
Matthias Clasen
b0344e1fd8 surface: Add debug spew for color states
Log the preferred color state events we get.
2024-11-14 15:33:35 -05:00
Matthias Clasen
77e340f23d Merge branch 'for-main' into 'main'
text: Try harder not to select inserted Emoji

See merge request GNOME/gtk!7921
2024-11-14 16:14:19 +00:00
Matthias Clasen
1d1ef311e3 text: Try harder not to select inserted Emoji
We had code trying to handle the case of focus coming from a
child, but it is running too late to be effective. Instead,
keep a flag that tells us if the Emoji picker is still open.
2024-11-14 10:49:42 -05:00
Sveinn í Felli
1ce19d3c77 Update Icelandic translation
(cherry picked from commit b3e794e4f5)
2024-11-13 16:05:16 +00:00
Sveinn í Felli
3e6e8e6dd5 Update Icelandic translation
(cherry picked from commit 482c55550c)
2024-11-13 16:01:01 +00:00
Matthias Clasen
78738fac3b Merge branch 'cm/fix-goptioncontext-leak' into 'main'
updateiconcache: Fix GOptionContext leak in main

See merge request GNOME/gtk!7918
2024-11-13 13:37:34 +00:00
correctmost
549f537445 updateiconcache: Fix GOptionContext leak in main 2024-11-12 21:16:18 -05:00
8 changed files with 2366 additions and 1313 deletions

View File

@@ -928,6 +928,10 @@ preferred_changed (GdkWaylandColorSurface *color,
{
GdkWaylandSurface *self = GDK_WAYLAND_SURFACE (data);
GDK_DISPLAY_DEBUG (gdk_surface_get_display (GDK_SURFACE (self)), EVENTS,
"preferred color state, surface %p color state %s",
self, gdk_color_state_get_name (color_state));
gdk_surface_set_color_state (GDK_SURFACE (self), color_state);
self->color_state_changed = TRUE;

View File

@@ -590,6 +590,7 @@ populate_servers (GtkPlacesView *view)
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
gtk_widget_add_css_class (button, "sidebar-button");
gtk_widget_set_tooltip_text (button, _("Remove server"));
gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 2);
gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), grid);

View File

@@ -291,6 +291,7 @@ struct _GtkTextPrivate
guint propagate_text_width : 1;
guint text_handles_enabled : 1;
guint enable_undo : 1;
guint emoji_chooser_open : 1;
};
struct _GtkTextPasswordHint
@@ -3459,7 +3460,7 @@ gtk_text_grab_focus (GtkWidget *widget)
if (!GTK_WIDGET_CLASS (gtk_text_parent_class)->grab_focus (GTK_WIDGET (self)))
return FALSE;
if (priv->editable && !priv->in_click && !prev_focus_was_child)
if (priv->editable && !priv->in_click && !prev_focus_was_child && !priv->emoji_chooser_open)
{
g_object_get (gtk_widget_get_settings (widget),
"gtk-entry-select-on-focus",
@@ -7183,6 +7184,15 @@ gtk_text_get_tabs (GtkText *self)
return priv->tabs;
}
static void
emoji_chooser_closed (GtkWidget *chooser,
GtkText *text)
{
GtkTextPrivate *priv = gtk_text_get_instance_private (text);
priv->emoji_chooser_open = 1;
}
static void
emoji_picked (GtkEmojiChooser *chooser,
const char *text,
@@ -7208,6 +7218,7 @@ emoji_picked (GtkEmojiChooser *chooser,
static void
gtk_text_insert_emoji (GtkText *self)
{
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
GtkWidget *chooser;
if (gtk_widget_get_ancestor (GTK_WIDGET (self), GTK_TYPE_EMOJI_CHOOSER) != NULL)
@@ -7221,10 +7232,11 @@ gtk_text_insert_emoji (GtkText *self)
gtk_widget_set_parent (chooser, GTK_WIDGET (self));
g_signal_connect (chooser, "emoji-picked", G_CALLBACK (emoji_picked), self);
g_signal_connect_swapped (chooser, "hide", G_CALLBACK (gtk_text_grab_focus_without_selecting), self);
g_signal_connect_swapped (chooser, "hide", G_CALLBACK (emoji_chooser_closed), self);
}
gtk_popover_popup (GTK_POPOVER (chooser));
priv->emoji_chooser_open = 1;
}
static void

View File

@@ -183,8 +183,13 @@ update_allocation (GtkWidget *w,
char *size_label;
GEnumClass *class;
GEnumValue *value;
GtkWidget *target;
if (!gtk_widget_compute_bounds (w, gtk_widget_get_parent (w), &bounds))
target = gtk_widget_get_parent (w);
if (target == NULL)
target = w;
if (!gtk_widget_compute_bounds (w, target, &bounds))
graphene_rect_init (&bounds, 0, 0, 0, 0);
size_label = g_strdup_printf ("%g×%g+%g+%g",

View File

@@ -45,6 +45,7 @@
#include "gtklabel.h"
#include "gtklistitem.h"
#include "gtkpopover.h"
#include "gtknative.h"
#include "gtksettings.h"
#include "gtksingleselection.h"
#include "gtksignallistitemfactory.h"
@@ -132,6 +133,37 @@ object_tree_widget_get_children (GObject *object)
return G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
}
static GObject *
object_tree_window_get_parent (GObject *object)
{
return NULL;
}
static GListModel *
object_tree_native_get_children (GObject *object)
{
GtkNative *native = GTK_NATIVE (object);
GListStore *list;
GListModel *sublist;
list = g_list_store_new (G_TYPE_LIST_MODEL);
sublist = G_LIST_MODEL (g_list_store_new (G_TYPE_OBJECT));
if (gtk_native_get_surface (native))
g_list_store_append (G_LIST_STORE (sublist), gtk_native_get_surface (native));
if (gtk_native_get_renderer (native))
g_list_store_append (G_LIST_STORE (sublist), gtk_native_get_renderer (native));
g_list_store_append (list, sublist);
g_object_unref (sublist);
sublist = object_tree_widget_get_children (object);
g_list_store_append (list, sublist);
g_object_unref (sublist);
return G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
}
static GListModel *
object_tree_tree_model_sort_get_children (GObject *object)
{
@@ -518,6 +550,16 @@ static const ObjectTreeClassFuncs object_tree_class_funcs[] = {
object_tree_widget_get_parent,
object_tree_combo_box_get_children
},
{
gtk_window_get_type,
object_tree_window_get_parent,
object_tree_native_get_children,
},
{
gtk_popover_get_type,
object_tree_widget_get_parent,
object_tree_native_get_children,
},
{
gtk_widget_get_type,
object_tree_widget_get_parent,

View File

@@ -275,6 +275,7 @@
<property name="direction">0</property>
<property name="popover">recent_servers_popover</property>
<property name="icon-name">pan-down-symbolic</property>
<property name="tooltip-text" translatable="yes">Show recent servers</property>
<style>
<class name="server-list-button"/>
</style>

3607
po/is.po

File diff suppressed because it is too large Load Diff

View File

@@ -1708,6 +1708,7 @@ main (int argc, char **argv)
g_option_context_add_main_entries (context, args, GETTEXT_PACKAGE);
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
path = argv[1];
#ifdef G_OS_WIN32