filebrowser: Improve GTK3 support
This commit is contained in:
parent
3fa783ec0e
commit
70a9d462ec
|
@ -323,7 +323,7 @@ set_click_policy_property (PlumaFileBrowserView *obj,
|
||||||
obj->priv->hover_path = NULL;
|
obj->priv->hover_path = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (GTK_WIDGET (obj))) {
|
if (gtk_widget_get_realized (GTK_WIDGET (obj))) {
|
||||||
win = gtk_widget_get_window (GTK_WIDGET (obj));
|
win = gtk_widget_get_window (GTK_WIDGET (obj));
|
||||||
gdk_window_set_cursor (win, NULL);
|
gdk_window_set_cursor (win, NULL);
|
||||||
|
|
||||||
|
@ -642,7 +642,11 @@ key_press_event (GtkWidget *widget,
|
||||||
handled = FALSE;
|
handled = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||||
|
if (!gtk_widget_has_focus (widget)) {
|
||||||
|
#else
|
||||||
if (!GTK_WIDGET_HAS_FOCUS (widget)) {
|
if (!GTK_WIDGET_HAS_FOCUS (widget)) {
|
||||||
|
#endif
|
||||||
handled = FALSE;
|
handled = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -997,7 +997,11 @@ create_toolbar (PlumaFileBrowserWidget * obj,
|
||||||
"DirectoryPrevious");
|
"DirectoryPrevious");
|
||||||
g_object_set (action, "is_important", TRUE, "short_label",
|
g_object_set (action, "is_important", TRUE, "short_label",
|
||||||
_("Previous location"), NULL);
|
_("Previous location"), NULL);
|
||||||
|
#if GTK_CHECK_VERSION (2, 16, 0)
|
||||||
|
gtk_activatable_set_related_action (GTK_ACTIVATABLE (widget), action);
|
||||||
|
#else
|
||||||
gtk_action_connect_proxy (action, widget);
|
gtk_action_connect_proxy (action, widget);
|
||||||
|
#endif
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (widget), 0);
|
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (widget), 0);
|
||||||
|
|
||||||
/* Next directory menu tool item */
|
/* Next directory menu tool item */
|
||||||
|
@ -1018,7 +1022,11 @@ create_toolbar (PlumaFileBrowserWidget * obj,
|
||||||
"DirectoryNext");
|
"DirectoryNext");
|
||||||
g_object_set (action, "is_important", TRUE, "short_label",
|
g_object_set (action, "is_important", TRUE, "short_label",
|
||||||
_("Previous location"), NULL);
|
_("Previous location"), NULL);
|
||||||
|
#if GTK_CHECK_VERSION (2, 16, 0)
|
||||||
|
gtk_activatable_set_related_action (GTK_ACTIVATABLE (widget), action);
|
||||||
|
#else
|
||||||
gtk_action_connect_proxy (action, widget);
|
gtk_action_connect_proxy (action, widget);
|
||||||
|
#endif
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (widget), 1);
|
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (widget), 1);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (obj), toolbar, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (obj), toolbar, FALSE, FALSE, 0);
|
||||||
|
|
Loading…
Reference in New Issue