mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-01 05:23:56 +00:00
general: Switch to GTK4
The new major version of the toolkit is a requirement to fix old issues and enable future enhancements. Update symbols and adapt logic to API changes. Update and simplify UI definitions. Update local copy of places sidebar and places view. Replace dependencies with their GTK4-compatible successors. Make a minimum changes required to build and run, with known regressions to be fixed in future commits. For a detailed breakup of the changes, see the 36 commits-deep log leading to d5763facb1e5045251171ed1273dca0859f3542f. This is the main part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/276
This commit is contained in:
parent
0417198030
commit
e358c2343c
|
@ -118,7 +118,7 @@
|
|||
"builddir": true,
|
||||
"config-opts": [
|
||||
"-Ddocs=false",
|
||||
"-Dbackends=gtk3",
|
||||
"-Dbackends=gtk4",
|
||||
"--libdir=/app/lib",
|
||||
"--buildtype=debugoptimized"
|
||||
],
|
||||
|
|
|
@ -86,7 +86,7 @@ modules:
|
|||
builddir: true
|
||||
config-opts:
|
||||
- "-Ddocs=false"
|
||||
- "-Dbackends=gtk3"
|
||||
- "-Dbackends=gtk4"
|
||||
- "--libdir=/app/lib"
|
||||
- "--buildtype=debugoptimized"
|
||||
sources:
|
||||
|
|
|
@ -40,8 +40,7 @@ main (int argc,
|
|||
|
||||
|
||||
LIBXML_TEST_VERSION
|
||||
gtk_init (&argc,
|
||||
&argv);
|
||||
gtk_init ();
|
||||
|
||||
/* Run the checks for eel twice. */
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ timed_wait_delayed_close_timeout_callback (gpointer callback_data)
|
|||
G_CALLBACK (timed_wait_delayed_close_destroy_dialog_callback),
|
||||
GUINT_TO_POINTER (handler_id));
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (callback_data));
|
||||
gtk_window_destroy (GTK_WINDOW (callback_data));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ timed_wait_free (TimedWait *wait)
|
|||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (wait->dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (wait->dialog));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ trash_dialog_response_callback (GtkDialog *dialog,
|
|||
int response_id,
|
||||
TimedWait *wait)
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -334,7 +334,7 @@ eel_show_simple_dialog (GtkWidget *parent,
|
|||
chosen_parent = NULL;
|
||||
if (parent != NULL)
|
||||
{
|
||||
top_widget = gtk_widget_get_toplevel (parent);
|
||||
top_widget = GTK_WIDGET (gtk_widget_get_root (parent));
|
||||
if (GTK_IS_WINDOW (top_widget))
|
||||
{
|
||||
chosen_parent = top_widget;
|
||||
|
@ -368,7 +368,7 @@ eel_show_simple_dialog (GtkWidget *parent,
|
|||
}
|
||||
va_end (button_title_args);
|
||||
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
return GTK_DIALOG (dialog);
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ show_message_dialog (const char *primary_text,
|
|||
gtk_widget_show (GTK_WIDGET (dialog));
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
G_CALLBACK (gtk_window_destroy), NULL);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
|
|
@ -276,7 +276,7 @@ bacon_video_widget_properties_new (void)
|
|||
|
||||
g_object_unref (group);
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (props));
|
||||
gtk_widget_show (GTK_WIDGET (props));
|
||||
|
||||
return GTK_WIDGET (props);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ create_props (const char *url)
|
|||
props = totem_properties_view_new (url, label);
|
||||
gtk_container_add (GTK_CONTAINER (window), props);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
gtk_widget_show (window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -58,7 +58,7 @@ int main (int argc, char **argv)
|
|||
|
||||
totem_gst_disable_display_decoders ();
|
||||
gst_init (&argc, &argv);
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (argc != 2) {
|
||||
g_print ("Usage: %s [URI]\n", argv[0]);
|
||||
|
|
|
@ -80,7 +80,7 @@ append_item (NautilusImagesPropertiesPage *page,
|
|||
|
||||
value_label = gtk_label_new (value);
|
||||
|
||||
gtk_label_set_line_wrap (GTK_LABEL (value_label), TRUE);
|
||||
gtk_label_set_wrap (GTK_LABEL (value_label), TRUE);
|
||||
gtk_grid_attach_next_to (GTK_GRID (page->grid), value_label,
|
||||
name_label, GTK_POS_RIGHT,
|
||||
1, 1);
|
||||
|
@ -93,7 +93,7 @@ append_item (NautilusImagesPropertiesPage *page,
|
|||
static void
|
||||
nautilus_image_properties_page_init (NautilusImagesPropertiesPage *self)
|
||||
{
|
||||
self->page_widget = gtk_scrolled_window_new (NULL, NULL);
|
||||
self->page_widget = gtk_scrolled_window_new ();
|
||||
|
||||
g_object_set (self->page_widget,
|
||||
"margin-bottom", 6,
|
||||
|
@ -119,7 +119,7 @@ nautilus_image_properties_page_init (NautilusImagesPropertiesPage *self)
|
|||
self->grid);
|
||||
#endif
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (self->page_widget));
|
||||
gtk_widget_show (GTK_WIDGET (self->page_widget));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -83,10 +83,10 @@ if get_option('introspection')
|
|||
'-DNAUTILUS_COMPILATION'
|
||||
],
|
||||
sources: libnautilus_extension_sources,
|
||||
nsversion: '3.0',
|
||||
nsversion: '4.0',
|
||||
namespace: 'Nautilus',
|
||||
includes: [
|
||||
'Gtk-3.0',
|
||||
'Gtk-4.0',
|
||||
'Gio-2.0',
|
||||
'GLib-2.0'
|
||||
],
|
||||
|
@ -115,7 +115,7 @@ pkgconfig.generate(
|
|||
requires: [
|
||||
'gio-2.0',
|
||||
'glib-2.0',
|
||||
'gtk+-3.0'
|
||||
'gtk4'
|
||||
],
|
||||
variables: [
|
||||
'exec_prefix=${prefix}',
|
||||
|
|
10
meson.build
10
meson.build
|
@ -107,14 +107,14 @@ gio_unix = dependency('gio-unix-2.0', version: glib_ver)
|
|||
glib = dependency('glib-2.0', version: glib_ver)
|
||||
gmodule = dependency('gmodule-no-export-2.0', version: glib_ver)
|
||||
gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.4.0')
|
||||
gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0')
|
||||
gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
|
||||
libhandy = dependency('libhandy-1', version: '>= 1.1.90')
|
||||
gnome_desktop = dependency('gnome-desktop-4', version: '>= 1.0.0')
|
||||
gtk = dependency('gtk4', version: '>= 4.6')
|
||||
libadwaita = dependency('libadwaita-1', version: '>= 1.0')
|
||||
libportal = []
|
||||
libportal_gtk3 = []
|
||||
libportal_gtk4 = []
|
||||
if get_option('libportal')
|
||||
libportal = dependency('libportal', version: '>= 0.5')
|
||||
libportal_gtk3 = dependency('libportal-gtk3', version: '>= 0.5')
|
||||
libportal_gtk4 = dependency('libportal-gtk4', version: '>= 0.5')
|
||||
endif
|
||||
selinux = []
|
||||
if get_option('selinux')
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
# action.
|
||||
# Also remove/add the neccesary bits to make it work inside nautilus
|
||||
|
||||
URL=https://gitlab.gnome.org/GNOME/gtk/raw/gtk-3-24/gtk/
|
||||
URLUI=https://gitlab.gnome.org/GNOME/gtk/raw/gtk-3-24/gtk/ui/
|
||||
SUFIX=?h=gtk-3-24
|
||||
URL=https://gitlab.gnome.org/GNOME/gtk/raw/master/gtk/
|
||||
URLUI=https://gitlab.gnome.org/GNOME/gtk/raw/master/gtk/ui/
|
||||
SUFIX=?h=master
|
||||
|
||||
# Since comments are not allowed inside the sed line, this is what it will do
|
||||
# by order:
|
||||
|
@ -24,27 +24,22 @@ SUFIX=?h=gtk-3-24
|
|||
# use local sidebar header instead of private gtk one
|
||||
# in-line replace private gtkfilesystem.h helper function
|
||||
# ignore shadowed variable which we would treat as compile error
|
||||
# use local header instead of private gtk one
|
||||
# replace private macros with their expansion
|
||||
# replace private enum type with our own equivalent
|
||||
|
||||
update_file () {
|
||||
_source="$1"
|
||||
_dest="$2"
|
||||
|
||||
curl "${_source}" | sed \
|
||||
-e 's/gtkplacesview/nautilusgtkplacesview/g' \
|
||||
-e 's/gtk_places_view/nautilus_gtk_places_view/g' \
|
||||
-e 's/GtkPlacesView/NautilusGtkPlacesView/g' \
|
||||
-e 's/GTK_PLACES_VIEW/NAUTILUS_GTK_PLACES_VIEW/g' \
|
||||
-e 's/GTK_TYPE_PLACES_VIEW/NAUTILUS_TYPE_GTK_PLACES_VIEW/g' \
|
||||
-e 's/GTK_IS_PLACES_VIEW/NAUTILUS_IS_GTK_PLACES_VIEW/g' \
|
||||
-e 's/gtkplaces/nautilusgtkplaces/g' \
|
||||
-e 's/gtk_places_/nautilus_gtk_places_/g' \
|
||||
-e 's/GtkPlaces/NautilusGtkPlaces/g' \
|
||||
-e 's/GTK_PLACES_/NAUTILUS_GTK_PLACES_/g' \
|
||||
-e 's/GTK_TYPE_PLACES_/NAUTILUS_TYPE_GTK_PLACES_/g' \
|
||||
-e 's/GTK_IS_PLACES_/NAUTILUS_IS_GTK_PLACES_/g' \
|
||||
-e 's/G_DECLARE_FINAL_TYPE (NautilusGtkPlacesViewRow, nautilus_gtk_places_view_row, GTK, PLACES_VIEW_ROW, GtkListBoxRow/ G_DECLARE_FINAL_TYPE (NautilusGtkPlacesViewRow, nautilus_gtk_places_view_row, NAUTILUS, GTK_PLACES_VIEW_ROW, GtkListBoxRow/g' \
|
||||
-e 's/gtkplacessidebar/nautilusgtkplacessidebar/g' \
|
||||
-e 's/gtk_places_sidebar/nautilus_gtk_places_sidebar/g' \
|
||||
-e 's/GtkPlacesSidebar/NautilusGtkPlacesSidebar/g' \
|
||||
-e 's/GTK_PLACES_SIDEBAR/NAUTILUS_GTK_PLACES_SIDEBAR/g' \
|
||||
-e 's/GTK_TYPE_PLACES_SIDEBAR/NAUTILUS_TYPE_GTK_PLACES_SIDEBAR/g' \
|
||||
-e 's/GTK_IS_PLACES_SIDEBAR/NAUTILUS_IS_GTK_PLACES_SIDEBAR/g' \
|
||||
-e 's/GtkPlacesOpen/NautilusGtkPlacesOpen/g' \
|
||||
-e 's/GTK_PLACES_OPEN/NAUTILUS_GTK_PLACES_OPEN/g' \
|
||||
-e 's/gtkbookmarksmanager/nautilusgtkbookmarksmanager/g' \
|
||||
-e 's/gtk_bookmarks_manager/nautilus_gtk_bookmarks_manager/g' \
|
||||
-e 's/GtkBookmarksManager/NautilusGtkBookmarksManager/g' \
|
||||
|
@ -75,6 +70,8 @@ update_file () {
|
|||
-e "s/P_(\(.*\))/\1/" \
|
||||
-e "s/I_(\(.*\))/\1/" \
|
||||
-e '/"config.h"/a #include <gtk\/gtk.h>' \
|
||||
-e 's/<gtk\/gtkwidget.h>/<gtk\/gtk.h>/g' \
|
||||
-e '/gtkenums.h/d' \
|
||||
-e '/gtktypebuiltins.h/d' \
|
||||
-e '/gtkintl.h/d' \
|
||||
-e '/<gtk\/gtkbox.h>/d' \
|
||||
|
@ -88,7 +85,9 @@ update_file () {
|
|||
-e '/"gtki\(.*\).h"/d' \
|
||||
-e '/"gtkl\(.*\).h"/d' \
|
||||
-e '/"gtkm\(.*\).h"/d' \
|
||||
-e '/"gtkn\(.*\).h"/d' \
|
||||
-e '/"gtkpo\(.*\).h"/d' \
|
||||
-e '/"gtkpr\(.*\).h"/d' \
|
||||
-e '/"gtkr\(.*\).h"/d' \
|
||||
-e '/"gtksc\(.*\).h"/d' \
|
||||
-e '/"gtkse\(.*\).h"/d' \
|
||||
|
@ -99,9 +98,14 @@ update_file () {
|
|||
-e '/"gtkw\(.*\).h"/d' \
|
||||
-e '/#error/d' \
|
||||
-e 's/gtk\/libgtk/gnome\/nautilus\/gtk/g' \
|
||||
-e 's/<gtk\/nautilusgtkplacessidebar.h>/"nautilusgtkplacessidebar.h"'/g \
|
||||
-e 's/<gtk\/nautilusgtkplacessidebarprivate.h>/"nautilusgtkplacessidebarprivate.h"'/g \
|
||||
-e 's/_gtk_file_info_consider_as_directory (info)/(g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY || g_file_info_get_file_type (info) == G_FILE_TYPE_MOUNTABLE || g_file_info_get_file_type (info) == G_FILE_TYPE_SHORTCUT)/g' \
|
||||
-e '/#include "nautilus-trash-monitor.h"/a #pragma GCC diagnostic ignored "-Wshadow"' \
|
||||
-e 's/gtk_drag_check_threshold_double/gtk_drag_check_threshold/g' \
|
||||
-e 's/NAUTILUS_TYPE_GTK_PLACES_OPEN_FLAGS/NAUTILUS_TYPE_OPEN_FLAGS/g' \
|
||||
-e '/"config.h"/a #include "nautilus-enum-types.h"' \
|
||||
-e 's/GTK_PARAM_READABLE/G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB/g' \
|
||||
-e 's/GTK_PARAM_READWRITE/G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB/g' \
|
||||
> "${_dest}"
|
||||
}
|
||||
|
||||
|
@ -110,9 +114,8 @@ update_file "${URL}/gtkplacesviewprivate.h${SUFIX}" "nautilusgtkplacesviewprivat
|
|||
update_file "${URLUI}/gtkplacesview.ui${SUFIX}" "nautilusgtkplacesview.ui"
|
||||
update_file "${URL}/gtkplacessidebar.c${SUFIX}" "nautilusgtkplacessidebar.c"
|
||||
update_file "${URL}/gtkplacessidebarprivate.h${SUFIX}" "nautilusgtkplacessidebarprivate.h"
|
||||
update_file "${URL}/gtkplacessidebar.h${SUFIX}" "nautilusgtkplacessidebar.h"
|
||||
update_file "${URL}/gtkbookmarksmanager.c${SUFIX}" "nautilusgtkbookmarksmanager.c"
|
||||
update_file "${URL}/gtkbookmarksmanager.h${SUFIX}" "nautilusgtkbookmarksmanager.h"
|
||||
update_file "${URL}/gtkbookmarksmanagerprivate.h${SUFIX}" "nautilusgtkbookmarksmanagerprivate.h"
|
||||
update_file "${URL}/gtkplacesviewrow.c${SUFIX}" "nautilusgtkplacesviewrow.c"
|
||||
update_file "${URL}/gtkplacesviewrowprivate.h${SUFIX}" "nautilusgtkplacesviewrowprivate.h"
|
||||
update_file "${URLUI}/gtkplacesviewrow.ui${SUFIX}" "nautilusgtkplacesviewrow.ui"
|
||||
|
|
|
@ -24,12 +24,13 @@
|
|||
#include "config.h"
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "nautilus-enum-types.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include "nautilusgtkbookmarksmanager.h"
|
||||
#include "nautilusgtkbookmarksmanagerprivate.h"
|
||||
|
||||
static void
|
||||
_gtk_bookmark_free (gpointer data)
|
||||
|
@ -44,7 +45,7 @@ _gtk_bookmark_free (gpointer data)
|
|||
static void
|
||||
set_error_bookmark_doesnt_exist (GFile *file, GError **error)
|
||||
{
|
||||
gchar *uri = g_file_get_uri (file);
|
||||
char *uri = g_file_get_uri (file);
|
||||
|
||||
g_set_error (error,
|
||||
GTK_FILE_CHOOSER_ERROR,
|
||||
|
@ -59,7 +60,7 @@ static GFile *
|
|||
get_legacy_bookmarks_file (void)
|
||||
{
|
||||
GFile *file;
|
||||
gchar *filename;
|
||||
char *filename;
|
||||
|
||||
filename = g_build_filename (g_get_home_dir (), ".gtk-bookmarks", NULL);
|
||||
file = g_file_new_for_path (filename);
|
||||
|
@ -72,8 +73,12 @@ static GFile *
|
|||
get_bookmarks_file (void)
|
||||
{
|
||||
GFile *file;
|
||||
gchar *filename;
|
||||
char *filename;
|
||||
|
||||
/* Use gtk-3.0's bookmarks file as the format didn't change.
|
||||
* Add the 3.0 file format to get_legacy_bookmarks_file() when
|
||||
* the format does change.
|
||||
*/
|
||||
filename = g_build_filename (g_get_user_config_dir (), "gtk-3.0", "bookmarks", NULL);
|
||||
file = g_file_new_for_path (filename);
|
||||
g_free (filename);
|
||||
|
@ -82,16 +87,11 @@ get_bookmarks_file (void)
|
|||
}
|
||||
|
||||
static GSList *
|
||||
read_bookmarks (GFile *file)
|
||||
parse_bookmarks (const char *contents)
|
||||
{
|
||||
gchar *contents;
|
||||
gchar **lines, *space;
|
||||
char **lines, *space;
|
||||
GSList *bookmarks = NULL;
|
||||
gint i;
|
||||
|
||||
if (!g_file_load_contents (file, NULL, &contents,
|
||||
NULL, NULL, NULL))
|
||||
return NULL;
|
||||
int i;
|
||||
|
||||
lines = g_strsplit (contents, "\n", -1);
|
||||
|
||||
|
@ -119,11 +119,60 @@ read_bookmarks (GFile *file)
|
|||
|
||||
bookmarks = g_slist_reverse (bookmarks);
|
||||
g_strfreev (lines);
|
||||
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
static GSList *
|
||||
read_bookmarks (GFile *file)
|
||||
{
|
||||
char *contents;
|
||||
GSList *bookmarks = NULL;
|
||||
|
||||
if (!g_file_load_contents (file, NULL, &contents,
|
||||
NULL, NULL, NULL))
|
||||
return NULL;
|
||||
|
||||
bookmarks = parse_bookmarks (contents);
|
||||
|
||||
g_free (contents);
|
||||
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
static void
|
||||
notify_changed (NautilusGtkBookmarksManager *manager)
|
||||
{
|
||||
if (manager->changed_func)
|
||||
manager->changed_func (manager->changed_func_data);
|
||||
}
|
||||
|
||||
static void
|
||||
read_bookmarks_finish (GObject *source,
|
||||
GAsyncResult *result,
|
||||
gpointer data)
|
||||
{
|
||||
GFile *file = G_FILE (source);
|
||||
NautilusGtkBookmarksManager *manager = data;
|
||||
char *contents = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
if (!g_file_load_contents_finish (file, result, &contents, NULL, NULL, &error))
|
||||
{
|
||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
g_warning ("Failed to load '%s': %s", g_file_peek_path (file), error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
g_slist_free_full (manager->bookmarks, _gtk_bookmark_free);
|
||||
manager->bookmarks = parse_bookmarks (contents);
|
||||
|
||||
g_free (contents);
|
||||
|
||||
notify_changed (manager);
|
||||
}
|
||||
|
||||
static void
|
||||
save_bookmarks (GFile *bookmarks_file,
|
||||
GSList *bookmarks)
|
||||
|
@ -138,7 +187,7 @@ save_bookmarks (GFile *bookmarks_file,
|
|||
for (l = bookmarks; l; l = l->next)
|
||||
{
|
||||
GtkBookmark *bookmark = l->data;
|
||||
gchar *uri;
|
||||
char *uri;
|
||||
|
||||
uri = g_file_get_uri (bookmark->file);
|
||||
if (!uri)
|
||||
|
@ -178,13 +227,6 @@ save_bookmarks (GFile *bookmarks_file,
|
|||
g_string_free (contents, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
notify_changed (NautilusGtkBookmarksManager *manager)
|
||||
{
|
||||
if (manager->changed_func)
|
||||
manager->changed_func (manager->changed_func_data);
|
||||
}
|
||||
|
||||
static void
|
||||
bookmarks_file_changed (GFileMonitor *monitor,
|
||||
GFile *file,
|
||||
|
@ -199,15 +241,17 @@ bookmarks_file_changed (GFileMonitor *monitor,
|
|||
case G_FILE_MONITOR_EVENT_CHANGED:
|
||||
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
|
||||
case G_FILE_MONITOR_EVENT_CREATED:
|
||||
case G_FILE_MONITOR_EVENT_DELETED:
|
||||
g_slist_free_full (manager->bookmarks, _gtk_bookmark_free);
|
||||
manager->bookmarks = read_bookmarks (file);
|
||||
|
||||
gdk_threads_enter ();
|
||||
notify_changed (manager);
|
||||
gdk_threads_leave ();
|
||||
g_file_load_contents_async (file, manager->cancellable, read_bookmarks_finish, manager);
|
||||
break;
|
||||
|
||||
case G_FILE_MONITOR_EVENT_DELETED:
|
||||
case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED:
|
||||
case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
|
||||
case G_FILE_MONITOR_EVENT_UNMOUNTED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED:
|
||||
case G_FILE_MONITOR_EVENT_RENAMED:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_IN:
|
||||
case G_FILE_MONITOR_EVENT_MOVED_OUT:
|
||||
default:
|
||||
/* ignore at the moment */
|
||||
break;
|
||||
|
@ -226,9 +270,10 @@ _nautilus_gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, gpoin
|
|||
manager->changed_func = changed_func;
|
||||
manager->changed_func_data = changed_func_data;
|
||||
|
||||
manager->cancellable = g_cancellable_new ();
|
||||
|
||||
bookmarks_file = get_bookmarks_file ();
|
||||
manager->bookmarks = read_bookmarks (bookmarks_file);
|
||||
if (!manager->bookmarks)
|
||||
if (!g_file_query_exists (bookmarks_file, NULL))
|
||||
{
|
||||
GFile *legacy_bookmarks_file;
|
||||
|
||||
|
@ -240,6 +285,8 @@ _nautilus_gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, gpoin
|
|||
|
||||
g_object_unref (legacy_bookmarks_file);
|
||||
}
|
||||
else
|
||||
g_file_load_contents_async (bookmarks_file, manager->cancellable, read_bookmarks_finish, manager);
|
||||
|
||||
error = NULL;
|
||||
manager->bookmarks_monitor = g_file_monitor_file (bookmarks_file,
|
||||
|
@ -254,6 +301,7 @@ _nautilus_gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, gpoin
|
|||
manager->bookmarks_monitor_changed_id = g_signal_connect (manager->bookmarks_monitor, "changed",
|
||||
G_CALLBACK (bookmarks_file_changed), manager);
|
||||
|
||||
|
||||
g_object_unref (bookmarks_file);
|
||||
|
||||
return manager;
|
||||
|
@ -264,6 +312,9 @@ _nautilus_gtk_bookmarks_manager_free (NautilusGtkBookmarksManager *manager)
|
|||
{
|
||||
g_return_if_fail (manager != NULL);
|
||||
|
||||
g_cancellable_cancel (manager->cancellable);
|
||||
g_object_unref (manager->cancellable);
|
||||
|
||||
if (manager->bookmarks_monitor)
|
||||
{
|
||||
g_file_monitor_cancel (manager->bookmarks_monitor);
|
||||
|
@ -339,7 +390,7 @@ _nautilus_gtk_bookmarks_manager_has_bookmark (NautilusGtkBookmarksManager *manag
|
|||
gboolean
|
||||
_nautilus_gtk_bookmarks_manager_insert_bookmark (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
gint position,
|
||||
int position,
|
||||
GError **error)
|
||||
{
|
||||
GSList *link;
|
||||
|
@ -353,7 +404,7 @@ _nautilus_gtk_bookmarks_manager_insert_bookmark (NautilusGtkBookmarksManager *ma
|
|||
|
||||
if (link)
|
||||
{
|
||||
gchar *uri;
|
||||
char *uri;
|
||||
bookmark = link->data;
|
||||
uri = g_file_get_uri (bookmark->file);
|
||||
|
||||
|
@ -423,7 +474,7 @@ _nautilus_gtk_bookmarks_manager_remove_bookmark (NautilusGtkBookmarksManager *ma
|
|||
gboolean
|
||||
_nautilus_gtk_bookmarks_manager_reorder_bookmark (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
gint new_position,
|
||||
int new_position,
|
||||
GError **error)
|
||||
{
|
||||
GSList *link;
|
||||
|
@ -468,12 +519,12 @@ _nautilus_gtk_bookmarks_manager_reorder_bookmark (NautilusGtkBookmarksManager *m
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
gchar *
|
||||
char *
|
||||
_nautilus_gtk_bookmarks_manager_get_bookmark_label (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file)
|
||||
{
|
||||
GSList *bookmarks;
|
||||
gchar *label = NULL;
|
||||
char *label = NULL;
|
||||
|
||||
g_return_val_if_fail (manager != NULL, NULL);
|
||||
g_return_val_if_fail (file != NULL, NULL);
|
||||
|
@ -500,7 +551,7 @@ _nautilus_gtk_bookmarks_manager_get_bookmark_label (NautilusGtkBookmarksManager
|
|||
gboolean
|
||||
_nautilus_gtk_bookmarks_manager_set_bookmark_label (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
const gchar *label,
|
||||
const char *label,
|
||||
GError **error)
|
||||
{
|
||||
GFile *bookmarks_file;
|
||||
|
@ -532,7 +583,7 @@ _nautilus_gtk_bookmarks_manager_set_bookmark_label (NautilusGtkBookmarksManager
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
_nautilus_gtk_bookmarks_manager_get_xdg_type (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
GUserDirectory *directory)
|
||||
|
@ -540,7 +591,7 @@ _nautilus_gtk_bookmarks_manager_get_xdg_type (NautilusGtkBookmarksManager *manag
|
|||
GSList *link;
|
||||
gboolean match;
|
||||
GFile *location;
|
||||
const gchar *path;
|
||||
const char *path;
|
||||
GUserDirectory dir;
|
||||
GtkBookmark *bookmark;
|
||||
|
||||
|
|
|
@ -38,12 +38,14 @@ typedef struct
|
|||
|
||||
gpointer changed_func_data;
|
||||
GtkBookmarksChangedFunc changed_func;
|
||||
|
||||
GCancellable *cancellable;
|
||||
} NautilusGtkBookmarksManager;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GFile *file;
|
||||
gchar *label;
|
||||
char *label;
|
||||
} GtkBookmark;
|
||||
|
||||
NautilusGtkBookmarksManager *_nautilus_gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func,
|
||||
|
@ -56,7 +58,7 @@ GSList *_nautilus_gtk_bookmarks_manager_list_bookmarks (NautilusGtkBookmarksMana
|
|||
|
||||
gboolean _nautilus_gtk_bookmarks_manager_insert_bookmark (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
gint position,
|
||||
int position,
|
||||
GError **error);
|
||||
|
||||
gboolean _nautilus_gtk_bookmarks_manager_remove_bookmark (NautilusGtkBookmarksManager *manager,
|
||||
|
@ -65,23 +67,20 @@ gboolean _nautilus_gtk_bookmarks_manager_remove_bookmark (NautilusGtkBookmarksMa
|
|||
|
||||
gboolean _nautilus_gtk_bookmarks_manager_reorder_bookmark (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
gint new_position,
|
||||
int new_position,
|
||||
GError **error);
|
||||
|
||||
gboolean _nautilus_gtk_bookmarks_manager_has_bookmark (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file);
|
||||
|
||||
gchar * _nautilus_gtk_bookmarks_manager_get_bookmark_label (NautilusGtkBookmarksManager *manager,
|
||||
char * _nautilus_gtk_bookmarks_manager_get_bookmark_label (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file);
|
||||
|
||||
gboolean _nautilus_gtk_bookmarks_manager_set_bookmark_label (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
const gchar *label,
|
||||
const char *label,
|
||||
GError **error);
|
||||
|
||||
gboolean _nautilus_gtk_bookmarks_manager_get_xdg_type (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file,
|
||||
GUserDirectory *directory);
|
||||
gboolean _nautilus_gtk_bookmarks_manager_get_is_builtin (NautilusGtkBookmarksManager *manager,
|
||||
GFile *file);
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,159 +0,0 @@
|
|||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
||||
|
||||
/* NautilusGtkPlacesSidebar - sidebar widget for places in the filesystem
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This code comes from Nautilus, GNOME’s file manager.
|
||||
*
|
||||
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
|
||||
* Federico Mena Quintero <federico@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __NAUTILUS_GTK_PLACES_SIDEBAR_H__
|
||||
#define __NAUTILUS_GTK_PLACES_SIDEBAR_H__
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkwidget.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define NAUTILUS_TYPE_GTK_PLACES_SIDEBAR (nautilus_gtk_places_sidebar_get_type ())
|
||||
#define NAUTILUS_GTK_PLACES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR, NautilusGtkPlacesSidebar))
|
||||
#define NAUTILUS_GTK_PLACES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR, NautilusGtkPlacesSidebarClass))
|
||||
#define NAUTILUS_IS_GTK_PLACES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR))
|
||||
#define NAUTILUS_IS_GTK_PLACES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR))
|
||||
#define NAUTILUS_GTK_PLACES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR, NautilusGtkPlacesSidebarClass))
|
||||
|
||||
typedef struct _NautilusGtkPlacesSidebar NautilusGtkPlacesSidebar;
|
||||
typedef struct _NautilusGtkPlacesSidebarClass NautilusGtkPlacesSidebarClass;
|
||||
|
||||
/**
|
||||
* NautilusGtkPlacesOpenFlags:
|
||||
* @NAUTILUS_GTK_PLACES_OPEN_NORMAL: This is the default mode that #NautilusGtkPlacesSidebar uses if no other flags
|
||||
* are specified. It indicates that the calling application should open the selected location
|
||||
* in the normal way, for example, in the folder view beside the sidebar.
|
||||
* @NAUTILUS_GTK_PLACES_OPEN_NEW_TAB: When passed to nautilus_gtk_places_sidebar_set_open_flags(), this indicates
|
||||
* that the application can open folders selected from the sidebar in new tabs. This value
|
||||
* will be passed to the #NautilusGtkPlacesSidebar::open-location signal when the user selects
|
||||
* that a location be opened in a new tab instead of in the standard fashion.
|
||||
* @NAUTILUS_GTK_PLACES_OPEN_NEW_WINDOW: Similar to @NAUTILUS_GTK_PLACES_OPEN_NEW_TAB, but indicates that the application
|
||||
* can open folders in new windows.
|
||||
*
|
||||
* These flags serve two purposes. First, the application can call nautilus_gtk_places_sidebar_set_open_flags()
|
||||
* using these flags as a bitmask. This tells the sidebar that the application is able to open
|
||||
* folders selected from the sidebar in various ways, for example, in new tabs or in new windows in
|
||||
* addition to the normal mode.
|
||||
*
|
||||
* Second, when one of these values gets passed back to the application in the
|
||||
* #NautilusGtkPlacesSidebar::open-location signal, it means that the application should
|
||||
* open the selected location in the normal way, in a new tab, or in a new
|
||||
* window. The sidebar takes care of determining the desired way to open the location,
|
||||
* based on the modifier keys that the user is pressing at the time the selection is made.
|
||||
*
|
||||
* If the application never calls nautilus_gtk_places_sidebar_set_open_flags(), then the sidebar will only
|
||||
* use #NAUTILUS_GTK_PLACES_OPEN_NORMAL in the #NautilusGtkPlacesSidebar::open-location signal. This is the
|
||||
* default mode of operation.
|
||||
*/
|
||||
typedef enum {
|
||||
NAUTILUS_GTK_PLACES_OPEN_NORMAL = 1 << 0,
|
||||
NAUTILUS_GTK_PLACES_OPEN_NEW_TAB = 1 << 1,
|
||||
NAUTILUS_GTK_PLACES_OPEN_NEW_WINDOW = 1 << 2
|
||||
} NautilusGtkPlacesOpenFlags;
|
||||
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GType nautilus_gtk_places_sidebar_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GtkWidget * nautilus_gtk_places_sidebar_new (void);
|
||||
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
NautilusGtkPlacesOpenFlags nautilus_gtk_places_sidebar_get_open_flags (NautilusGtkPlacesSidebar *sidebar);
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
void nautilus_gtk_places_sidebar_set_open_flags (NautilusGtkPlacesSidebar *sidebar,
|
||||
NautilusGtkPlacesOpenFlags flags);
|
||||
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GFile * nautilus_gtk_places_sidebar_get_location (NautilusGtkPlacesSidebar *sidebar);
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
void nautilus_gtk_places_sidebar_set_location (NautilusGtkPlacesSidebar *sidebar,
|
||||
GFile *location);
|
||||
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_recent (NautilusGtkPlacesSidebar *sidebar);
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
void nautilus_gtk_places_sidebar_set_show_recent (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_recent);
|
||||
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_desktop (NautilusGtkPlacesSidebar *sidebar);
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
void nautilus_gtk_places_sidebar_set_show_desktop (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_desktop);
|
||||
|
||||
GDK_DEPRECATED_IN_3_18
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_connect_to_server (NautilusGtkPlacesSidebar *sidebar);
|
||||
GDK_DEPRECATED_IN_3_18
|
||||
void nautilus_gtk_places_sidebar_set_show_connect_to_server (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_connect_to_server);
|
||||
GDK_AVAILABLE_IN_3_14
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_enter_location (NautilusGtkPlacesSidebar *sidebar);
|
||||
GDK_AVAILABLE_IN_3_14
|
||||
void nautilus_gtk_places_sidebar_set_show_enter_location (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_enter_location);
|
||||
|
||||
GDK_AVAILABLE_IN_3_12
|
||||
void nautilus_gtk_places_sidebar_set_local_only (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean local_only);
|
||||
GDK_AVAILABLE_IN_3_12
|
||||
gboolean nautilus_gtk_places_sidebar_get_local_only (NautilusGtkPlacesSidebar *sidebar);
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
void nautilus_gtk_places_sidebar_add_shortcut (NautilusGtkPlacesSidebar *sidebar,
|
||||
GFile *location);
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
void nautilus_gtk_places_sidebar_remove_shortcut (NautilusGtkPlacesSidebar *sidebar,
|
||||
GFile *location);
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GSList * nautilus_gtk_places_sidebar_list_shortcuts (NautilusGtkPlacesSidebar *sidebar);
|
||||
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GFile * nautilus_gtk_places_sidebar_get_nth_bookmark (NautilusGtkPlacesSidebar *sidebar,
|
||||
gint n);
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
void nautilus_gtk_places_sidebar_set_drop_targets_visible (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean visible,
|
||||
GdkDragContext *context);
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_trash (NautilusGtkPlacesSidebar *sidebar);
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
void nautilus_gtk_places_sidebar_set_show_trash (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_trash);
|
||||
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
void nautilus_gtk_places_sidebar_set_show_other_locations (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_other_locations);
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_other_locations (NautilusGtkPlacesSidebar *sidebar);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
void nautilus_gtk_places_sidebar_set_show_starred_location (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_starred_location);
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_starred_location (NautilusGtkPlacesSidebar *sidebar);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __NAUTILUS_GTK_PLACES_SIDEBAR_H__ */
|
|
@ -22,38 +22,126 @@
|
|||
#define __NAUTILUS_GTK_PLACES_SIDEBAR_PRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include "nautilusgtkplacessidebar.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define NAUTILUS_TYPE_GTK_PLACES_SIDEBAR (nautilus_gtk_places_sidebar_get_type ())
|
||||
#define NAUTILUS_GTK_PLACES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR, NautilusGtkPlacesSidebar))
|
||||
#define NAUTILUS_GTK_PLACES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR, NautilusGtkPlacesSidebarClass))
|
||||
#define NAUTILUS_IS_GTK_PLACES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR))
|
||||
#define NAUTILUS_IS_GTK_PLACES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR))
|
||||
#define NAUTILUS_GTK_PLACES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_GTK_PLACES_SIDEBAR, NautilusGtkPlacesSidebarClass))
|
||||
|
||||
typedef struct _NautilusGtkPlacesSidebar NautilusGtkPlacesSidebar;
|
||||
typedef struct _NautilusGtkPlacesSidebarClass NautilusGtkPlacesSidebarClass;
|
||||
|
||||
/*
|
||||
* NautilusGtkPlacesOpenFlags:
|
||||
* @NAUTILUS_GTK_PLACES_OPEN_NORMAL: This is the default mode that NautilusGtkPlacesSidebar uses if no other flags
|
||||
* are specified. It indicates that the calling application should open the selected location
|
||||
* in the normal way, for example, in the folder view beside the sidebar.
|
||||
* @NAUTILUS_GTK_PLACES_OPEN_NEW_TAB: When passed to nautilus_gtk_places_sidebar_set_open_flags(), this indicates
|
||||
* that the application can open folders selected from the sidebar in new tabs. This value
|
||||
* will be passed to the NautilusGtkPlacesSidebar::open-location signal when the user selects
|
||||
* that a location be opened in a new tab instead of in the standard fashion.
|
||||
* @NAUTILUS_GTK_PLACES_OPEN_NEW_WINDOW: Similar to @NAUTILUS_GTK_PLACES_OPEN_NEW_TAB, but indicates that the application
|
||||
* can open folders in new windows.
|
||||
*
|
||||
* These flags serve two purposes. First, the application can call nautilus_gtk_places_sidebar_set_open_flags()
|
||||
* using these flags as a bitmask. This tells the sidebar that the application is able to open
|
||||
* folders selected from the sidebar in various ways, for example, in new tabs or in new windows in
|
||||
* addition to the normal mode.
|
||||
*
|
||||
* Second, when one of these values gets passed back to the application in the
|
||||
* NautilusGtkPlacesSidebar::open-location signal, it means that the application should
|
||||
* open the selected location in the normal way, in a new tab, or in a new
|
||||
* window. The sidebar takes care of determining the desired way to open the location,
|
||||
* based on the modifier keys that the user is pressing at the time the selection is made.
|
||||
*
|
||||
* If the application never calls nautilus_gtk_places_sidebar_set_open_flags(), then the sidebar will only
|
||||
* use NAUTILUS_GTK_PLACES_OPEN_NORMAL in the NautilusGtkPlacesSidebar::open-location signal. This is the
|
||||
* default mode of operation.
|
||||
*/
|
||||
typedef enum {
|
||||
NAUTILUS_GTK_PLACES_OPEN_NORMAL = 1 << 0,
|
||||
NAUTILUS_GTK_PLACES_OPEN_NEW_TAB = 1 << 1,
|
||||
NAUTILUS_GTK_PLACES_OPEN_NEW_WINDOW = 1 << 2
|
||||
} NautilusGtkPlacesOpenFlags;
|
||||
|
||||
GType nautilus_gtk_places_sidebar_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget * nautilus_gtk_places_sidebar_new (void);
|
||||
|
||||
NautilusGtkPlacesOpenFlags nautilus_gtk_places_sidebar_get_open_flags (NautilusGtkPlacesSidebar *sidebar);
|
||||
void nautilus_gtk_places_sidebar_set_open_flags (NautilusGtkPlacesSidebar *sidebar,
|
||||
NautilusGtkPlacesOpenFlags flags);
|
||||
|
||||
GFile * nautilus_gtk_places_sidebar_get_location (NautilusGtkPlacesSidebar *sidebar);
|
||||
void nautilus_gtk_places_sidebar_set_location (NautilusGtkPlacesSidebar *sidebar,
|
||||
GFile *location);
|
||||
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_recent (NautilusGtkPlacesSidebar *sidebar);
|
||||
void nautilus_gtk_places_sidebar_set_show_recent (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_recent);
|
||||
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_desktop (NautilusGtkPlacesSidebar *sidebar);
|
||||
void nautilus_gtk_places_sidebar_set_show_desktop (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_desktop);
|
||||
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_enter_location (NautilusGtkPlacesSidebar *sidebar);
|
||||
void nautilus_gtk_places_sidebar_set_show_enter_location (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_enter_location);
|
||||
|
||||
void nautilus_gtk_places_sidebar_add_shortcut (NautilusGtkPlacesSidebar *sidebar,
|
||||
GFile *location);
|
||||
void nautilus_gtk_places_sidebar_remove_shortcut (NautilusGtkPlacesSidebar *sidebar,
|
||||
GFile *location);
|
||||
GListModel * nautilus_gtk_places_sidebar_get_shortcuts (NautilusGtkPlacesSidebar *sidebar);
|
||||
|
||||
GFile * nautilus_gtk_places_sidebar_get_nth_bookmark (NautilusGtkPlacesSidebar *sidebar,
|
||||
int n);
|
||||
void nautilus_gtk_places_sidebar_set_drop_targets_visible (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean visible);
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_trash (NautilusGtkPlacesSidebar *sidebar);
|
||||
void nautilus_gtk_places_sidebar_set_show_trash (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_trash);
|
||||
|
||||
void nautilus_gtk_places_sidebar_set_show_other_locations (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_other_locations);
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_other_locations (NautilusGtkPlacesSidebar *sidebar);
|
||||
|
||||
void nautilus_gtk_places_sidebar_set_show_starred_location (NautilusGtkPlacesSidebar *sidebar,
|
||||
gboolean show_starred_location);
|
||||
gboolean nautilus_gtk_places_sidebar_get_show_starred_location (NautilusGtkPlacesSidebar *sidebar);
|
||||
|
||||
/* Keep order, since it's used for the sort functions */
|
||||
typedef enum {
|
||||
SECTION_INVALID,
|
||||
SECTION_COMPUTER,
|
||||
SECTION_MOUNTS,
|
||||
SECTION_CLOUD,
|
||||
SECTION_BOOKMARKS,
|
||||
SECTION_OTHER_LOCATIONS,
|
||||
N_SECTIONS
|
||||
} NautilusGtkPlacesSidebarSectionType;
|
||||
NAUTILUS_GTK_PLACES_SECTION_INVALID,
|
||||
NAUTILUS_GTK_PLACES_SECTION_COMPUTER,
|
||||
NAUTILUS_GTK_PLACES_SECTION_MOUNTS,
|
||||
NAUTILUS_GTK_PLACES_SECTION_CLOUD,
|
||||
NAUTILUS_GTK_PLACES_SECTION_BOOKMARKS,
|
||||
NAUTILUS_GTK_PLACES_SECTION_OTHER_LOCATIONS,
|
||||
NAUTILUS_GTK_PLACES_N_SECTIONS
|
||||
} NautilusGtkPlacesSectionType;
|
||||
|
||||
typedef enum {
|
||||
PLACES_INVALID,
|
||||
PLACES_BUILT_IN,
|
||||
PLACES_XDG_DIR,
|
||||
PLACES_MOUNTED_VOLUME,
|
||||
PLACES_BOOKMARK,
|
||||
PLACES_HEADING,
|
||||
PLACES_CONNECT_TO_SERVER,
|
||||
PLACES_ENTER_LOCATION,
|
||||
PLACES_DROP_FEEDBACK,
|
||||
PLACES_BOOKMARK_PLACEHOLDER,
|
||||
PLACES_OTHER_LOCATIONS,
|
||||
PLACES_STARRED_LOCATION,
|
||||
N_PLACES
|
||||
} NautilusGtkPlacesSidebarPlaceType;
|
||||
NAUTILUS_GTK_PLACES_INVALID,
|
||||
NAUTILUS_GTK_PLACES_BUILT_IN,
|
||||
NAUTILUS_GTK_PLACES_XDG_DIR,
|
||||
NAUTILUS_GTK_PLACES_MOUNTED_VOLUME,
|
||||
NAUTILUS_GTK_PLACES_BOOKMARK,
|
||||
NAUTILUS_GTK_PLACES_HEADING,
|
||||
NAUTILUS_GTK_PLACES_CONNECT_TO_SERVER,
|
||||
NAUTILUS_GTK_PLACES_ENTER_LOCATION,
|
||||
NAUTILUS_GTK_PLACES_DROP_FEEDBACK,
|
||||
NAUTILUS_GTK_PLACES_BOOKMARK_PLACEHOLDER,
|
||||
NAUTILUS_GTK_PLACES_OTHER_LOCATIONS,
|
||||
NAUTILUS_GTK_PLACES_STARRED_LOCATION,
|
||||
NAUTILUS_GTK_PLACES_N_PLACES
|
||||
} NautilusGtkPlacesPlaceType;
|
||||
|
||||
gchar *nautilus_gtk_places_sidebar_get_location_title (NautilusGtkPlacesSidebar *sidebar);
|
||||
char *nautilus_gtk_places_sidebar_get_location_title (NautilusGtkPlacesSidebar *sidebar);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="gtk30">
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<interface domain="gtk40">
|
||||
<object class="GtkListStore" id="completion_store">
|
||||
<columns>
|
||||
<!-- column-name name -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name uri -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
</object>
|
||||
|
@ -16,20 +13,21 @@
|
|||
<property name="popup-completion">0</property>
|
||||
</object>
|
||||
<object class="GtkPopover" id="server_adresses_popover">
|
||||
<property name="relative-to">address_entry</property>
|
||||
<property name="position">2</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="border-width">18</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="orientation">1</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="margin-start">18</property>
|
||||
<property name="margin-end">18</property>
|
||||
<property name="margin-top">18</property>
|
||||
<property name="margin-bottom">18</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="label" translatable="yes">Server Addresses</property>
|
||||
<property name="label" translatable="1">Server Addresses</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
|
@ -38,21 +36,16 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="label" translatable="yes">Server addresses are made up of a protocol prefix and an address. Examples:</property>
|
||||
<property name="label" translatable="1">Server addresses are made up of a protocol prefix and an address. Examples:</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="width-chars">40</property>
|
||||
<property name="max-width-chars">40</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="label">smb://gnome.org, ssh://192.168.0.1, ftp://[2001:db8::1]</property>
|
||||
<property name="wrap">1</property>
|
||||
|
@ -60,50 +53,41 @@
|
|||
<property name="max-width-chars">40</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="available_protocols_grid">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin-top">12</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="label" translatable="yes">Available Protocols</property>
|
||||
<property name="label" translatable="1">Available Protocols</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Prefix</property>
|
||||
<property name="label" translatable="1">Prefix</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -111,233 +95,186 @@
|
|||
<object class="GtkPopover" id="recent_servers_popover">
|
||||
<child>
|
||||
<object class="GtkStack" id="recent_servers_stack">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="pixel-size">48</property>
|
||||
<property name="icon-name">network-server-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes" comments="Translators: Server as any successfully connected network address">No recent servers found</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">empty</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="valign">3</property>
|
||||
<property name="orientation">1</property>
|
||||
<property name="spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="pixel-size">48</property>
|
||||
<property name="icon-name">network-server-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="1" comments="Translators: Server as any successfully connected network address">No recent servers found</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="border-width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Recent Servers</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="min-content-width">250</property>
|
||||
<property name="min-content-height">200</property>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">list</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">1</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
<property name="margin-top">12</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="1">Recent Servers</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="has-frame">1</property>
|
||||
<property name="min-content-width">250</property>
|
||||
<property name="min-content-height">200</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="recent_servers_listbox">
|
||||
<property name="visible">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<signal name="row-activated" handler="on_recent_servers_listbox_row_activated" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
<object class="GtkViewport">
|
||||
<child>
|
||||
<object class="GtkListBox" id="recent_servers_listbox">
|
||||
<property name="selection-mode">0</property>
|
||||
<signal name="row-activated" handler="on_recent_servers_listbox_row_activated" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">list</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<template class="NautilusGtkPlacesView" parent="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<signal name="key-press-event" handler="on_key_press_event" object="NautilusGtkPlacesView" swapped="no"/>
|
||||
<property name="orientation">1</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">1</property>
|
||||
<property name="vhomogeneous">0</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<property name="transition-type">1</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">browse</property>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="listbox">
|
||||
<property name="visible">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="selection-mode">0</property>
|
||||
<signal name="row-activated" handler="on_listbox_row_activated" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">browse</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="pixel-size">72</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">No results found</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.44"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Try a different search</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">empty-search</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="halign">3</property>
|
||||
<property name="valign">3</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="orientation">1</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="pixel-size">72</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="1">No results found</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
<attribute name="scale" value="1.44"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="1">Try a different search</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkActionBar" id="actionbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<style>
|
||||
<class name="background"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Connect to _Server</property>
|
||||
<property name="label" translatable="1">Connect to _Server</property>
|
||||
<property name="mnemonic-widget">address_entry</property>
|
||||
<property name="use-underline">1</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkButton" id="connect_button">
|
||||
<property name="label" translatable="yes">Con_nect</property>
|
||||
<property name="label" translatable="1">Con_nect</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="valign">3</property>
|
||||
<signal name="clicked" handler="on_connect_button_clicked" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="address_entry">
|
||||
<property name="visible">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="width-chars">20</property>
|
||||
<property name="placeholder-text" translatable="yes">Enter server address…</property>
|
||||
<property name="placeholder-text" translatable="1">Enter server address…</property>
|
||||
<property name="secondary-icon-name">dialog-question-symbolic</property>
|
||||
<property name="completion">address_entry_completion</property>
|
||||
<signal name="notify::text" handler="on_address_entry_text_changed" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
|
@ -347,36 +284,21 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="server_list_button">
|
||||
<property name="visible">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="direction">up</property>
|
||||
<property name="direction">0</property>
|
||||
<property name="popover">recent_servers_popover</property>
|
||||
<property name="icon-name">pan-down-symbolic</property>
|
||||
<style>
|
||||
<class name="server-list-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">pan-down-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#endif
|
||||
|
||||
#include "nautilusgtkplacessidebar.h"
|
||||
#include "nautilusgtkplacessidebarprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -35,30 +35,6 @@ G_BEGIN_DECLS
|
|||
|
||||
typedef struct _NautilusGtkPlacesView NautilusGtkPlacesView;
|
||||
typedef struct _NautilusGtkPlacesViewClass NautilusGtkPlacesViewClass;
|
||||
typedef struct _NautilusGtkPlacesViewPrivate NautilusGtkPlacesViewPrivate;
|
||||
|
||||
struct _NautilusGtkPlacesViewClass
|
||||
{
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
void (* open_location) (NautilusGtkPlacesView *view,
|
||||
GFile *location,
|
||||
NautilusGtkPlacesOpenFlags open_flags);
|
||||
|
||||
void (* show_error_message) (NautilusGtkPlacesSidebar *sidebar,
|
||||
const gchar *primary,
|
||||
const gchar *secondary);
|
||||
|
||||
/*< private >*/
|
||||
|
||||
/* Padding for future expansion */
|
||||
gpointer reserved[10];
|
||||
};
|
||||
|
||||
struct _NautilusGtkPlacesView
|
||||
{
|
||||
GtkBox parent_instance;
|
||||
};
|
||||
|
||||
GType nautilus_gtk_places_view_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
@ -66,14 +42,9 @@ NautilusGtkPlacesOpenFlags nautilus_gtk_places_view_get_open_flags
|
|||
void nautilus_gtk_places_view_set_open_flags (NautilusGtkPlacesView *view,
|
||||
NautilusGtkPlacesOpenFlags flags);
|
||||
|
||||
const gchar* nautilus_gtk_places_view_get_search_query (NautilusGtkPlacesView *view);
|
||||
const char * nautilus_gtk_places_view_get_search_query (NautilusGtkPlacesView *view);
|
||||
void nautilus_gtk_places_view_set_search_query (NautilusGtkPlacesView *view,
|
||||
const gchar *query_text);
|
||||
|
||||
gboolean nautilus_gtk_places_view_get_local_only (NautilusGtkPlacesView *view);
|
||||
|
||||
void nautilus_gtk_places_view_set_local_only (NautilusGtkPlacesView *view,
|
||||
gboolean local_only);
|
||||
const char *query_text);
|
||||
|
||||
gboolean nautilus_gtk_places_view_get_loading (NautilusGtkPlacesView *view);
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "config.h"
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "nautilus-enum-types.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
|
@ -42,7 +43,6 @@ struct _NautilusGtkPlacesViewRow
|
|||
GtkSpinner *busy_spinner;
|
||||
GtkButton *eject_button;
|
||||
GtkImage *eject_icon;
|
||||
GtkEventBox *event_box;
|
||||
GtkImage *icon_image;
|
||||
GtkLabel *name_label;
|
||||
GtkLabel *path_label;
|
||||
|
@ -53,7 +53,7 @@ struct _NautilusGtkPlacesViewRow
|
|||
|
||||
GCancellable *cancellable;
|
||||
|
||||
gint is_network : 1;
|
||||
int is_network : 1;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (NautilusGtkPlacesViewRow, nautilus_gtk_places_view_row, GTK_TYPE_LIST_BOX_ROW)
|
||||
|
@ -82,9 +82,9 @@ measure_available_space_finished (GObject *object,
|
|||
GError *error;
|
||||
guint64 free_space;
|
||||
guint64 total_space;
|
||||
gchar *formatted_free_size;
|
||||
gchar *formatted_total_size;
|
||||
gchar *label;
|
||||
char *formatted_free_size;
|
||||
char *formatted_total_size;
|
||||
char *label;
|
||||
guint plural_form;
|
||||
|
||||
error = NULL;
|
||||
|
@ -210,16 +210,13 @@ nautilus_gtk_places_view_row_get_property (GObject *object,
|
|||
GParamSpec *pspec)
|
||||
{
|
||||
NautilusGtkPlacesViewRow *self;
|
||||
GIcon *icon;
|
||||
|
||||
self = NAUTILUS_GTK_PLACES_VIEW_ROW (object);
|
||||
icon = NULL;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_ICON:
|
||||
gtk_image_get_gicon (self->icon_image, &icon, NULL);
|
||||
g_value_set_object (value, icon);
|
||||
g_value_set_object (value, gtk_image_get_gicon (self->icon_image));
|
||||
break;
|
||||
|
||||
case PROP_NAME:
|
||||
|
@ -262,9 +259,7 @@ nautilus_gtk_places_view_row_set_property (GObject *object,
|
|||
switch (prop_id)
|
||||
{
|
||||
case PROP_ICON:
|
||||
gtk_image_set_from_gicon (self->icon_image,
|
||||
g_value_get_object (value),
|
||||
GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
gtk_image_set_from_gicon (self->icon_image, g_value_get_object (value));
|
||||
break;
|
||||
|
||||
case PROP_NAME:
|
||||
|
@ -308,6 +303,19 @@ nautilus_gtk_places_view_row_set_property (GObject *object,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_gtk_places_view_row_size_allocate (GtkWidget *widget,
|
||||
int width,
|
||||
int height,
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *menu = GTK_WIDGET (g_object_get_data (G_OBJECT (widget), "menu"));
|
||||
|
||||
GTK_WIDGET_CLASS (nautilus_gtk_places_view_row_parent_class)->size_allocate (widget, width, height, baseline);
|
||||
if (menu)
|
||||
gtk_popover_present (GTK_POPOVER (menu));
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_gtk_places_view_row_class_init (NautilusGtkPlacesViewRowClass *klass)
|
||||
{
|
||||
|
@ -318,6 +326,8 @@ nautilus_gtk_places_view_row_class_init (NautilusGtkPlacesViewRowClass *klass)
|
|||
object_class->get_property = nautilus_gtk_places_view_row_get_property;
|
||||
object_class->set_property = nautilus_gtk_places_view_row_set_property;
|
||||
|
||||
widget_class->size_allocate = nautilus_gtk_places_view_row_size_allocate;
|
||||
|
||||
properties[PROP_ICON] =
|
||||
g_param_spec_object ("icon",
|
||||
"Icon of the row",
|
||||
|
@ -376,7 +386,6 @@ nautilus_gtk_places_view_row_class_init (NautilusGtkPlacesViewRowClass *klass)
|
|||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkPlacesViewRow, busy_spinner);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkPlacesViewRow, eject_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkPlacesViewRow, eject_icon);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkPlacesViewRow, event_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkPlacesViewRow, icon_image);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkPlacesViewRow, name_label);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkPlacesViewRow, path_label);
|
||||
|
@ -430,14 +439,6 @@ nautilus_gtk_places_view_row_get_eject_button (NautilusGtkPlacesViewRow *row)
|
|||
return GTK_WIDGET (row->eject_button);
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
nautilus_gtk_places_view_row_get_event_box (NautilusGtkPlacesViewRow *row)
|
||||
{
|
||||
g_return_val_if_fail (NAUTILUS_IS_GTK_PLACES_VIEW_ROW (row), NULL);
|
||||
|
||||
return GTK_WIDGET (row->event_box);
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_gtk_places_view_row_set_busy (NautilusGtkPlacesViewRow *row,
|
||||
gboolean is_busy)
|
||||
|
@ -448,10 +449,12 @@ nautilus_gtk_places_view_row_set_busy (NautilusGtkPlacesViewRow *row,
|
|||
{
|
||||
gtk_stack_set_visible_child (row->mount_stack, GTK_WIDGET (row->busy_spinner));
|
||||
gtk_widget_set_child_visible (GTK_WIDGET (row->mount_stack), TRUE);
|
||||
gtk_spinner_start (row->busy_spinner);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_child_visible (GTK_WIDGET (row->mount_stack), FALSE);
|
||||
gtk_spinner_stop (row->busy_spinner);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,7 +474,7 @@ nautilus_gtk_places_view_row_set_is_network (NautilusGtkPlacesViewRow *row,
|
|||
{
|
||||
row->is_network = is_network;
|
||||
|
||||
gtk_image_set_from_icon_name (row->eject_icon, "media-eject-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (row->eject_icon, "media-eject-symbolic");
|
||||
gtk_widget_set_tooltip_text (GTK_WIDGET (row->eject_button), is_network ? _("Disconnect") : _("Unmount"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,80 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="gtk30">
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<interface domain="gtk40">
|
||||
<template class="NautilusGtkPlacesViewRow" parent="GtkListBoxRow">
|
||||
<property name="width-request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="event_box">
|
||||
<property name="visible">1</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="spacing">18</property>
|
||||
<object class="GtkImage" id="icon_image">
|
||||
<property name="pixel-size">32</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name_label">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="ellipsize">3</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="available_space_label">
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="path_label">
|
||||
<property name="justify">1</property>
|
||||
<property name="ellipsize">2</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="max-width-chars">15</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="mount_stack">
|
||||
<child>
|
||||
<object class="GtkImage" id="icon_image">
|
||||
<property name="visible">1</property>
|
||||
<property name="pixel-size">32</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="ellipsize">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="available_space_label">
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="path_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="justify">right</property>
|
||||
<property name="ellipsize">middle</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="max-width-chars">15</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="mount_stack">
|
||||
<property name="visible">1</property>
|
||||
<property name="hhomogeneous">1</property>
|
||||
<property name="vhomogeneous">1</property>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">button</property>
|
||||
<property name="child">
|
||||
<object class="GtkButton" id="eject_button">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="tooltip-text" translatable="yes">Unmount</property>
|
||||
<property name="visible">0</property>
|
||||
<property name="halign">3</property>
|
||||
<property name="valign">3</property>
|
||||
<property name="tooltip-text" translatable="1">Unmount</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="eject_icon">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">media-eject-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
|
@ -82,23 +61,23 @@
|
|||
<class name="sidebar-button"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="busy_spinner">
|
||||
<property name="visible">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">spinner</property>
|
||||
<property name="child">
|
||||
<object class="GtkSpinner" id="busy_spinner">
|
||||
<property name="halign">3</property>
|
||||
<property name="valign">3</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
|
@ -34,8 +34,6 @@ GtkWidget* nautilus_gtk_places_view_row_new (GVolu
|
|||
|
||||
GtkWidget* nautilus_gtk_places_view_row_get_eject_button (NautilusGtkPlacesViewRow *row);
|
||||
|
||||
GtkWidget* nautilus_gtk_places_view_row_get_event_box (NautilusGtkPlacesViewRow *row);
|
||||
|
||||
GMount* nautilus_gtk_places_view_row_get_mount (NautilusGtkPlacesViewRow *row);
|
||||
|
||||
GVolume* nautilus_gtk_places_view_row_get_volume (NautilusGtkPlacesViewRow *row);
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
#include "config.h"
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "nautilus-enum-types.h"
|
||||
|
||||
#include "nautilusgtksidebarrowprivate.h"
|
||||
/* For section and place type enums */
|
||||
#include "nautilusgtkplacessidebarprivate.h"
|
||||
#include "nautilusgtkplacessidebar.h"
|
||||
|
||||
#ifdef HAVE_CLOUDPROVIDERS
|
||||
#include <cloudproviders/cloudprovidersaccount.h>
|
||||
#include <cloudproviders.h>
|
||||
#endif
|
||||
|
||||
struct _NautilusGtkSidebarRow
|
||||
|
@ -36,22 +36,21 @@ struct _NautilusGtkSidebarRow
|
|||
GIcon *end_icon;
|
||||
GtkWidget *start_icon_widget;
|
||||
GtkWidget *end_icon_widget;
|
||||
gchar *label;
|
||||
gchar *tooltip;
|
||||
char *label;
|
||||
char *tooltip;
|
||||
GtkWidget *label_widget;
|
||||
gboolean ejectable;
|
||||
GtkWidget *eject_button;
|
||||
gint order_index;
|
||||
NautilusGtkPlacesSidebarSectionType section_type;
|
||||
NautilusGtkPlacesSidebarPlaceType place_type;
|
||||
gchar *uri;
|
||||
int order_index;
|
||||
NautilusGtkPlacesSectionType section_type;
|
||||
NautilusGtkPlacesPlaceType place_type;
|
||||
char *uri;
|
||||
GDrive *drive;
|
||||
GVolume *volume;
|
||||
GMount *mount;
|
||||
GObject *cloud_provider_account;
|
||||
gboolean placeholder;
|
||||
NautilusGtkPlacesSidebar *sidebar;
|
||||
GtkWidget *event_box;
|
||||
GtkWidget *revealer;
|
||||
GtkWidget *busy_spinner;
|
||||
};
|
||||
|
@ -88,7 +87,7 @@ cloud_row_update (NautilusGtkSidebarRow *self)
|
|||
{
|
||||
CloudProvidersAccount *account;
|
||||
GIcon *end_icon;
|
||||
gint provider_status;
|
||||
int provider_status;
|
||||
|
||||
account = CLOUD_PROVIDERS_ACCOUNT (self->cloud_provider_account);
|
||||
provider_status = cloud_providers_account_get_status (account);
|
||||
|
@ -165,11 +164,11 @@ nautilus_gtk_sidebar_row_get_property (GObject *object,
|
|||
break;
|
||||
|
||||
case PROP_SECTION_TYPE:
|
||||
g_value_set_int (value, self->section_type);
|
||||
g_value_set_enum (value, self->section_type);
|
||||
break;
|
||||
|
||||
case PROP_PLACE_TYPE:
|
||||
g_value_set_int (value, self->place_type);
|
||||
g_value_set_enum (value, self->place_type);
|
||||
break;
|
||||
|
||||
case PROP_URI:
|
||||
|
@ -208,7 +207,6 @@ nautilus_gtk_sidebar_row_set_property (GObject *object,
|
|||
GParamSpec *pspec)
|
||||
{
|
||||
NautilusGtkSidebarRow *self = NAUTILUS_GTK_SIDEBAR_ROW (object);
|
||||
GtkStyleContext *context;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
@ -223,9 +221,7 @@ nautilus_gtk_sidebar_row_set_property (GObject *object,
|
|||
if (object != NULL)
|
||||
{
|
||||
self->start_icon = G_ICON (g_object_ref (object));
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->start_icon_widget),
|
||||
self->start_icon,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->start_icon_widget), self->start_icon);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -241,9 +237,7 @@ nautilus_gtk_sidebar_row_set_property (GObject *object,
|
|||
if (object != NULL)
|
||||
{
|
||||
self->end_icon = G_ICON (g_object_ref (object));
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->end_icon_widget),
|
||||
self->end_icon,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->end_icon_widget), self->end_icon);
|
||||
gtk_widget_show (self->end_icon_widget);
|
||||
}
|
||||
else
|
||||
|
@ -279,16 +273,16 @@ nautilus_gtk_sidebar_row_set_property (GObject *object,
|
|||
break;
|
||||
|
||||
case PROP_SECTION_TYPE:
|
||||
self->section_type = g_value_get_int (value);
|
||||
if (self->section_type == SECTION_COMPUTER ||
|
||||
self->section_type == SECTION_OTHER_LOCATIONS)
|
||||
self->section_type = g_value_get_enum (value);
|
||||
if (self->section_type == NAUTILUS_GTK_PLACES_SECTION_COMPUTER ||
|
||||
self->section_type == NAUTILUS_GTK_PLACES_SECTION_OTHER_LOCATIONS)
|
||||
gtk_label_set_ellipsize (GTK_LABEL (self->label_widget), PANGO_ELLIPSIZE_NONE);
|
||||
else
|
||||
gtk_label_set_ellipsize (GTK_LABEL (self->label_widget), PANGO_ELLIPSIZE_END);
|
||||
break;
|
||||
|
||||
case PROP_PLACE_TYPE:
|
||||
self->place_type = g_value_get_int (value);
|
||||
self->place_type = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
case PROP_URI:
|
||||
|
@ -340,8 +334,8 @@ nautilus_gtk_sidebar_row_set_property (GObject *object,
|
|||
self->tooltip = NULL;
|
||||
gtk_widget_set_tooltip_text (GTK_WIDGET (self), NULL);
|
||||
self->ejectable = FALSE;
|
||||
self->section_type = SECTION_BOOKMARKS;
|
||||
self->place_type = PLACES_BOOKMARK_PLACEHOLDER;
|
||||
self->section_type = NAUTILUS_GTK_PLACES_SECTION_BOOKMARKS;
|
||||
self->place_type = NAUTILUS_GTK_PLACES_BOOKMARK_PLACEHOLDER;
|
||||
g_free (self->uri);
|
||||
self->uri = NULL;
|
||||
g_clear_object (&self->drive);
|
||||
|
@ -349,12 +343,9 @@ nautilus_gtk_sidebar_row_set_property (GObject *object,
|
|||
g_clear_object (&self->mount);
|
||||
g_clear_object (&self->cloud_provider_account);
|
||||
|
||||
gtk_container_foreach (GTK_CONTAINER (self),
|
||||
(GtkCallback) gtk_widget_destroy,
|
||||
NULL);
|
||||
gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (self), NULL);
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (self));
|
||||
gtk_style_context_add_class (context, "sidebar-placeholder-row");
|
||||
gtk_widget_add_css_class (GTK_WIDGET (self), "sidebar-placeholder-row");
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -380,18 +371,18 @@ on_child_revealed (GObject *self,
|
|||
void
|
||||
nautilus_gtk_sidebar_row_reveal (NautilusGtkSidebarRow *self)
|
||||
{
|
||||
gtk_widget_show_all (GTK_WIDGET (self));
|
||||
gtk_widget_show (GTK_WIDGET (self));
|
||||
gtk_revealer_set_reveal_child (GTK_REVEALER (self->revealer), TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_gtk_sidebar_row_hide (NautilusGtkSidebarRow *self,
|
||||
gboolean inmediate)
|
||||
gboolean immediate)
|
||||
{
|
||||
guint transition_duration;
|
||||
|
||||
transition_duration = gtk_revealer_get_transition_duration (GTK_REVEALER (self->revealer));
|
||||
if (inmediate)
|
||||
if (immediate)
|
||||
gtk_revealer_set_transition_duration (GTK_REVEALER (self->revealer), 0);
|
||||
|
||||
gtk_revealer_set_reveal_child (GTK_REVEALER (self->revealer), FALSE);
|
||||
|
@ -409,8 +400,7 @@ nautilus_gtk_sidebar_row_set_start_icon (NautilusGtkSidebarRow *self,
|
|||
{
|
||||
g_set_object (&self->start_icon, icon);
|
||||
if (self->start_icon != NULL)
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->start_icon_widget), self->start_icon,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->start_icon_widget), self->start_icon);
|
||||
else
|
||||
gtk_image_clear (GTK_IMAGE (self->start_icon_widget));
|
||||
|
||||
|
@ -428,8 +418,7 @@ nautilus_gtk_sidebar_row_set_end_icon (NautilusGtkSidebarRow *self,
|
|||
{
|
||||
g_set_object (&self->end_icon, icon);
|
||||
if (self->end_icon != NULL)
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->end_icon_widget), self->end_icon,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (self->end_icon_widget), self->end_icon);
|
||||
else
|
||||
if (self->end_icon_widget != NULL)
|
||||
gtk_image_clear (GTK_IMAGE (self->end_icon_widget));
|
||||
|
@ -467,6 +456,8 @@ static void
|
|||
nautilus_gtk_sidebar_row_init (NautilusGtkSidebarRow *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
||||
gtk_widget_set_focus_on_click (GTK_WIDGET (self), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -537,22 +528,24 @@ nautilus_gtk_sidebar_row_class_init (NautilusGtkSidebarRowClass *klass)
|
|||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
properties [PROP_SECTION_TYPE] =
|
||||
g_param_spec_int ("section-type",
|
||||
"section type",
|
||||
"The section type.",
|
||||
SECTION_INVALID, N_SECTIONS, SECTION_INVALID,
|
||||
(G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
g_param_spec_enum ("section-type",
|
||||
"section type",
|
||||
"The section type.",
|
||||
NAUTILUS_TYPE_GTK_PLACES_SECTION_TYPE,
|
||||
NAUTILUS_GTK_PLACES_SECTION_INVALID,
|
||||
(G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
properties [PROP_PLACE_TYPE] =
|
||||
g_param_spec_int ("place-type",
|
||||
"place type",
|
||||
"The place type.",
|
||||
PLACES_INVALID, N_PLACES, PLACES_INVALID,
|
||||
(G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
g_param_spec_enum ("place-type",
|
||||
"place type",
|
||||
"The place type.",
|
||||
NAUTILUS_TYPE_GTK_PLACES_PLACE_TYPE,
|
||||
NAUTILUS_GTK_PLACES_INVALID,
|
||||
(G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
properties [PROP_URI] =
|
||||
g_param_spec_string ("uri",
|
||||
|
@ -616,7 +609,6 @@ nautilus_gtk_sidebar_row_class_init (NautilusGtkSidebarRowClass *klass)
|
|||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkSidebarRow, end_icon_widget);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkSidebarRow, label_widget);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkSidebarRow, eject_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkSidebarRow, event_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkSidebarRow, revealer);
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusGtkSidebarRow, busy_spinner);
|
||||
|
||||
|
@ -651,12 +643,6 @@ nautilus_gtk_sidebar_row_get_eject_button (NautilusGtkSidebarRow *self)
|
|||
return self->eject_button;
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
nautilus_gtk_sidebar_row_get_event_box (NautilusGtkSidebarRow *self)
|
||||
{
|
||||
return self->event_box;
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_gtk_sidebar_row_set_busy (NautilusGtkSidebarRow *row,
|
||||
gboolean is_busy)
|
||||
|
|
|
@ -1,92 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="gtk30">
|
||||
<interface domain="gtk40">
|
||||
<template class="NautilusGtkSidebarRow" parent="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">1</property>
|
||||
<property name="margin-bottom">1</property>
|
||||
<property name="focus-on-click">False</property>
|
||||
<property name="focus-on-click">0</property>
|
||||
<style>
|
||||
<class name="sidebar-row"/>
|
||||
</style>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkRevealer" id="revealer">
|
||||
<property name="visible">1</property>
|
||||
<property name="reveal-child">1</property>
|
||||
<signal name="notify::child-revealed" handler="on_child_revealed"/>
|
||||
<style>
|
||||
<class name="sidebar-revealer"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="event_box">
|
||||
<property name="visible">1</property>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="start_icon_widget">
|
||||
<property name="visible">True</property>
|
||||
<style>
|
||||
<class name="sidebar-icon"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_widget">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="sidebar-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="end_icon_widget">
|
||||
<property name="visible">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="no-show-all">1</property>
|
||||
<style>
|
||||
<class name="sidebar-icon"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="eject_button">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin-start">4px</property>
|
||||
<property name="no-show-all">1</property>
|
||||
<property name="tooltip-text" translatable="yes">Unmount</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">media-eject-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
<class name="sidebar-button"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="busy_spinner">
|
||||
<property name="active">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin-start">4px</property>
|
||||
<property name="no-show-all">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkImage" id="start_icon_widget">
|
||||
<style>
|
||||
<class name="sidebar-icon"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_widget">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="sidebar-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="end_icon_widget">
|
||||
<property name="visible">0</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">2</property>
|
||||
<property name="valign">3</property>
|
||||
<style>
|
||||
<class name="sidebar-icon"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="eject_button">
|
||||
<property name="halign">3</property>
|
||||
<property name="valign">3</property>
|
||||
<property name="margin-start">4px</property>
|
||||
<property name="icon-name">media-eject-symbolic</property>
|
||||
<property name="tooltip-text" translatable="1">Unmount</property>
|
||||
<style>
|
||||
<class name="sidebar-button"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="busy_spinner">
|
||||
<property name="spinning">1</property>
|
||||
<property name="halign">3</property>
|
||||
<property name="valign">3</property>
|
||||
<property name="margin-start">4px</property>
|
||||
<property name="visible">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
|
@ -44,11 +44,10 @@ NautilusGtkSidebarRow *nautilus_gtk_sidebar_row_clone (NautilusGtkSidebarRow *s
|
|||
|
||||
/* Use these methods instead of gtk_widget_hide/show to use an animation */
|
||||
void nautilus_gtk_sidebar_row_hide (NautilusGtkSidebarRow *self,
|
||||
gboolean inmediate);
|
||||
gboolean immediate);
|
||||
void nautilus_gtk_sidebar_row_reveal (NautilusGtkSidebarRow *self);
|
||||
|
||||
GtkWidget *nautilus_gtk_sidebar_row_get_eject_button (NautilusGtkSidebarRow *self);
|
||||
GtkWidget *nautilus_gtk_sidebar_row_get_event_box (NautilusGtkSidebarRow *self);
|
||||
void nautilus_gtk_sidebar_row_set_start_icon (NautilusGtkSidebarRow *self,
|
||||
GIcon *icon);
|
||||
void nautilus_gtk_sidebar_row_set_end_icon (NautilusGtkSidebarRow *self,
|
||||
|
|
|
@ -14,6 +14,7 @@ libnautilus_sources = [
|
|||
c_template: 'nautilus-enum-types.c.template',
|
||||
h_template: 'nautilus-enum-types.h.template',
|
||||
sources: [
|
||||
'gtk/nautilusgtkplacessidebarprivate.h',
|
||||
'nautilus-enums.h',
|
||||
'nautilus-search-popover.h',
|
||||
'nautilus-special-location-bar.h',
|
||||
|
@ -55,18 +56,15 @@ libnautilus_sources = [
|
|||
namespace: 'Nautilus'
|
||||
),
|
||||
'gtk/nautilusgtkbookmarksmanager.c',
|
||||
'gtk/nautilusgtkbookmarksmanager.h',
|
||||
'gtk/nautilusgtkbookmarksmanagerprivate.h',
|
||||
'gtk/nautilusgtkplacessidebar.c',
|
||||
'gtk/nautilusgtkplacessidebarprivate.h',
|
||||
'gtk/nautilusgtkplacessidebar.h',
|
||||
'gtk/nautilusgtksidebarrow.c',
|
||||
'gtk/nautilusgtksidebarrowprivate.h',
|
||||
'gtk/nautilusgtkplacesview.c',
|
||||
'gtk/nautilusgtkplacesviewprivate.h',
|
||||
'gtk/nautilusgtkplacesviewrow.c',
|
||||
'gtk/nautilusgtkplacesviewrowprivate.h',
|
||||
'nautilus-gtk4-helpers.c',
|
||||
'nautilus-gtk4-helpers.h',
|
||||
'nautilus-application.c',
|
||||
'nautilus-application.h',
|
||||
'nautilus-bookmark-list.c',
|
||||
|
@ -265,9 +263,9 @@ nautilus_deps = [
|
|||
gmodule,
|
||||
gnome_autoar,
|
||||
gnome_desktop,
|
||||
libhandy,
|
||||
libadwaita,
|
||||
libportal,
|
||||
libportal_gtk3,
|
||||
libportal_gtk4,
|
||||
nautilus_extension,
|
||||
selinux,
|
||||
tracker_sparql,
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <libhandy-1/handy.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
#include <nautilus-extension.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -65,7 +65,6 @@
|
|||
#include "nautilus-view.h"
|
||||
#include "nautilus-window-slot.h"
|
||||
#include "nautilus-window.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -635,7 +634,7 @@ static int
|
|||
do_perform_self_checks (void)
|
||||
{
|
||||
#ifndef NAUTILUS_OMIT_SELF_CHECK
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
nautilus_profile_start (NULL);
|
||||
/* Run the checks (each twice) for nautilus and libnautilus-private. */
|
||||
|
@ -765,8 +764,7 @@ action_help (GSimpleAction *action,
|
|||
GError *error = NULL;
|
||||
|
||||
window = gtk_application_get_active_window (application);
|
||||
gtk_show_uri_on_window (window, "help:gnome-help/files",
|
||||
gtk_get_current_event_time (), &error);
|
||||
gtk_show_uri (window, "help:gnome-help/files", GDK_CURRENT_TIME);
|
||||
|
||||
if (error)
|
||||
{
|
||||
|
@ -777,7 +775,7 @@ action_help (GSimpleAction *action,
|
|||
_("There was an error displaying help: \n%s"),
|
||||
error->message);
|
||||
g_signal_connect (G_OBJECT (dialog), "response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
G_CALLBACK (gtk_window_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
||||
|
@ -1133,7 +1131,7 @@ theme_changed (GtkSettings *settings)
|
|||
{
|
||||
provider = gtk_css_provider_new ();
|
||||
file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/Adwaita.css");
|
||||
gtk_css_provider_load_from_file (provider, file, NULL);
|
||||
gtk_css_provider_load_from_file (provider, file);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
|
@ -1153,7 +1151,7 @@ theme_changed (GtkSettings *settings)
|
|||
{
|
||||
permanent_provider = gtk_css_provider_new ();
|
||||
file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/nautilus.css");
|
||||
gtk_css_provider_load_from_file (permanent_provider, file, NULL);
|
||||
gtk_css_provider_load_from_file (permanent_provider, file);
|
||||
/* The behavior of two style providers with the same priority is
|
||||
* undefined and gtk happens to prefer the provider that got added last.
|
||||
* Use a higher priority here to avoid this problem.
|
||||
|
@ -1273,7 +1271,7 @@ nautilus_application_startup_common (NautilusApplication *self)
|
|||
*/
|
||||
G_APPLICATION_CLASS (nautilus_application_parent_class)->startup (G_APPLICATION (self));
|
||||
|
||||
hdy_init ();
|
||||
adw_init ();
|
||||
|
||||
gtk_window_set_default_icon_name (APPLICATION_ID);
|
||||
|
||||
|
@ -1306,7 +1304,7 @@ nautilus_application_startup_common (NautilusApplication *self)
|
|||
|
||||
g_signal_connect (self, "shutdown", G_CALLBACK (on_application_shutdown), NULL);
|
||||
|
||||
g_signal_connect_object (gtk_icon_theme_get_default (),
|
||||
g_signal_connect_object (gtk_icon_theme_get_for_display (gdk_display_get_default ()),
|
||||
"changed",
|
||||
G_CALLBACK (icon_theme_changed_callback),
|
||||
NULL, 0);
|
||||
|
|
|
@ -47,7 +47,7 @@ autorun_software_dialog_destroy (AutorunSoftwareDialogData *data)
|
|||
G_CALLBACK (autorun_software_dialog_mount_unmounted),
|
||||
data);
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (data->dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (data->dialog));
|
||||
g_object_unref (data->mount);
|
||||
g_free (data);
|
||||
}
|
||||
|
@ -159,10 +159,10 @@ out:
|
|||
|
||||
g_signal_connect (dialog,
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
G_CALLBACK (gtk_window_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ autorun_software_dialog_response (GtkDialog *dialog,
|
|||
gint response_id,
|
||||
GMount *mount)
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ present_autorun_for_software_dialog (GMount *mount)
|
|||
G_CALLBACK (autorun_software_dialog_response),
|
||||
mount);
|
||||
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -252,7 +252,7 @@ main (int argc,
|
|||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
|
|
|
@ -63,8 +63,6 @@ struct _NautilusBatchRenameDialog
|
|||
GList *listbox_icons;
|
||||
GtkSizeGroup *size_group;
|
||||
|
||||
GList *motion_controllers;
|
||||
|
||||
GList *selection;
|
||||
GList *new_names;
|
||||
NautilusBatchRenameDialogMode mode;
|
||||
|
@ -429,14 +427,14 @@ batch_rename_dialog_get_new_names (NautilusBatchRenameDialog *dialog)
|
|||
|
||||
if (dialog->mode == NAUTILUS_BATCH_RENAME_DIALOG_REPLACE)
|
||||
{
|
||||
entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->find_entry)));
|
||||
entry_text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (dialog->find_entry)));
|
||||
}
|
||||
else
|
||||
{
|
||||
entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->name_entry)));
|
||||
entry_text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (dialog->name_entry)));
|
||||
}
|
||||
|
||||
replace_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->replace_entry)));
|
||||
replace_text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (dialog->replace_entry)));
|
||||
|
||||
if (dialog->mode == NAUTILUS_BATCH_RENAME_DIALOG_REPLACE)
|
||||
{
|
||||
|
@ -474,7 +472,7 @@ begin_batch_rename (NautilusBatchRenameDialog *dialog,
|
|||
/* do the actual rename here */
|
||||
nautilus_file_batch_rename (dialog->selection, new_names, NULL, NULL);
|
||||
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog->window)), NULL);
|
||||
gtk_widget_set_cursor (GTK_WIDGET (dialog->window), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -584,7 +582,7 @@ create_original_name_label (NautilusBatchRenameDialog *dialog,
|
|||
|
||||
dialog->listbox_labels_old = g_list_prepend (dialog->listbox_labels_old, label_old);
|
||||
|
||||
gtk_widget_show_all (label_old);
|
||||
gtk_widget_show (label_old);
|
||||
|
||||
return label_old;
|
||||
}
|
||||
|
@ -603,7 +601,7 @@ create_result_label (NautilusBatchRenameDialog *dialog,
|
|||
|
||||
dialog->listbox_labels_new = g_list_prepend (dialog->listbox_labels_new, label_new);
|
||||
|
||||
gtk_widget_show_all (label_new);
|
||||
gtk_widget_show (label_new);
|
||||
|
||||
return label_new;
|
||||
}
|
||||
|
@ -629,7 +627,7 @@ create_arrow (NautilusBatchRenameDialog *dialog,
|
|||
|
||||
dialog->listbox_icons = g_list_prepend (dialog->listbox_icons, icon);
|
||||
|
||||
gtk_widget_show_all (icon);
|
||||
gtk_widget_show (icon);
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
@ -637,9 +635,6 @@ create_arrow (NautilusBatchRenameDialog *dialog,
|
|||
static void
|
||||
prepare_batch_rename (NautilusBatchRenameDialog *dialog)
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
GdkDisplay *display;
|
||||
|
||||
/* wait for checking conflicts to finish, to be sure that
|
||||
* the rename can actually take place */
|
||||
if (dialog->directories_pending_conflict_check != NULL)
|
||||
|
@ -653,22 +648,14 @@ prepare_batch_rename (NautilusBatchRenameDialog *dialog)
|
|||
return;
|
||||
}
|
||||
|
||||
display = gtk_widget_get_display (GTK_WIDGET (dialog->window));
|
||||
cursor = gdk_cursor_new_from_name (display, "progress");
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog->window)),
|
||||
cursor);
|
||||
g_object_unref (cursor);
|
||||
gtk_widget_set_cursor_from_name (GTK_WIDGET (dialog->window), "progress");
|
||||
|
||||
display = gtk_widget_get_display (GTK_WIDGET (dialog));
|
||||
cursor = gdk_cursor_new_from_name (display, "progress");
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog)),
|
||||
cursor);
|
||||
g_object_unref (cursor);
|
||||
gtk_widget_set_cursor_from_name (GTK_WIDGET (dialog), "progress");
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET (dialog));
|
||||
begin_batch_rename (dialog, dialog->new_names);
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -687,7 +674,7 @@ batch_rename_dialog_on_response (NautilusBatchRenameDialog *dialog,
|
|||
cancel_conflict_check (dialog);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -939,7 +926,7 @@ update_listbox (NautilusBatchRenameDialog *dialog)
|
|||
else
|
||||
{
|
||||
new_name = batch_rename_replace_label_text (old_name,
|
||||
gtk_entry_get_text (GTK_ENTRY (dialog->find_entry)));
|
||||
gtk_editable_get_text (GTK_EDITABLE (dialog->find_entry)));
|
||||
gtk_label_set_markup (GTK_LABEL (label), new_name->str);
|
||||
|
||||
g_string_free (new_name, TRUE);
|
||||
|
@ -1227,11 +1214,11 @@ have_unallowed_character (NautilusBatchRenameDialog *dialog)
|
|||
|
||||
if (dialog->mode == NAUTILUS_BATCH_RENAME_DIALOG_FORMAT)
|
||||
{
|
||||
entry_text = gtk_entry_get_text (GTK_ENTRY (dialog->name_entry));
|
||||
entry_text = gtk_editable_get_text (GTK_EDITABLE (dialog->name_entry));
|
||||
}
|
||||
else
|
||||
{
|
||||
entry_text = gtk_entry_get_text (GTK_ENTRY (dialog->replace_entry));
|
||||
entry_text = gtk_editable_get_text (GTK_EDITABLE (dialog->replace_entry));
|
||||
}
|
||||
|
||||
if (strstr (entry_text, "/") != NULL)
|
||||
|
@ -1386,7 +1373,7 @@ update_display_text (NautilusBatchRenameDialog *dialog)
|
|||
static void
|
||||
batch_rename_dialog_mode_changed (NautilusBatchRenameDialog *dialog)
|
||||
{
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->format_mode_button)))
|
||||
if (gtk_check_button_get_active (GTK_CHECK_BUTTON (dialog->format_mode_button)))
|
||||
{
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (dialog->mode_stack), "format");
|
||||
|
||||
|
@ -1859,7 +1846,6 @@ nautilus_batch_rename_dialog_finalize (GObject *object)
|
|||
nautilus_directory_list_free (dialog->distinct_parent_directories);
|
||||
|
||||
g_object_unref (dialog->size_group);
|
||||
g_clear_list (&dialog->motion_controllers, g_object_unref);
|
||||
|
||||
g_hash_table_destroy (dialog->tag_info_table);
|
||||
|
||||
|
@ -1994,7 +1980,7 @@ nautilus_batch_rename_dialog_new (GList *selection,
|
|||
|
||||
fill_display_listbox (dialog);
|
||||
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
|
||||
gtk_widget_set_cursor (GTK_WIDGET (window), NULL);
|
||||
|
||||
g_string_free (dialog_title, TRUE);
|
||||
|
||||
|
@ -2007,15 +1993,13 @@ connect_to_pointer_motion_events (NautilusBatchRenameDialog *self,
|
|||
{
|
||||
GtkEventController *controller;
|
||||
|
||||
controller = gtk_event_controller_motion_new (listbox);
|
||||
controller = gtk_event_controller_motion_new ();
|
||||
gtk_widget_add_controller (listbox, controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
g_signal_connect (controller, "leave",
|
||||
G_CALLBACK (on_event_controller_motion_leave), self);
|
||||
g_signal_connect (controller, "motion",
|
||||
G_CALLBACK (on_event_controller_motion_motion), self);
|
||||
|
||||
self->motion_controllers = g_list_prepend (self->motion_controllers,
|
||||
controller);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gnome-autoar/gnome-autoar.h>
|
||||
#include <libhandy-1/handy.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
#include <eel/eel-vfs-extensions.h>
|
||||
|
||||
|
@ -203,7 +203,7 @@ update_selected_format (NautilusCompressDialogController *self,
|
|||
gtk_widget_set_visible (self->passphrase_entry, show_passphrase);
|
||||
if (!show_passphrase)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (self->passphrase_entry), "");
|
||||
gtk_editable_set_text (GTK_EDITABLE (self->passphrase_entry), "");
|
||||
gtk_entry_set_visibility (GTK_ENTRY (self->passphrase_entry), FALSE);
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self->passphrase_entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
|
@ -213,21 +213,11 @@ update_selected_format (NautilusCompressDialogController *self,
|
|||
gtk_stack_set_visible_child (GTK_STACK (self->extension_stack),
|
||||
active_label);
|
||||
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->zip_checkmark),
|
||||
NULL,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->encrypted_zip_checkmark),
|
||||
NULL,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->tar_xz_checkmark),
|
||||
NULL,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->seven_zip_checkmark),
|
||||
NULL,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (active_checkmark),
|
||||
"object-select-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->zip_checkmark), NULL);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->encrypted_zip_checkmark), NULL);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->tar_xz_checkmark), NULL);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->seven_zip_checkmark), NULL);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (active_checkmark), "object-select-symbolic");
|
||||
|
||||
g_settings_set_enum (nautilus_compression_preferences,
|
||||
NAUTILUS_PREFERENCES_DEFAULT_COMPRESSION_FORMAT,
|
||||
|
@ -240,7 +230,7 @@ update_selected_format (NautilusCompressDialogController *self,
|
|||
}
|
||||
|
||||
static void
|
||||
zip_row_on_activated (HdyActionRow *row,
|
||||
zip_row_on_activated (AdwActionRow *row,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusCompressDialogController *controller;
|
||||
|
@ -253,7 +243,7 @@ zip_row_on_activated (HdyActionRow *row,
|
|||
}
|
||||
|
||||
static void
|
||||
encrypted_zip_row_on_activated (HdyActionRow *row,
|
||||
encrypted_zip_row_on_activated (AdwActionRow *row,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusCompressDialogController *controller;
|
||||
|
@ -266,7 +256,7 @@ encrypted_zip_row_on_activated (HdyActionRow *row,
|
|||
}
|
||||
|
||||
static void
|
||||
tar_xz_row_on_activated (HdyActionRow *row,
|
||||
tar_xz_row_on_activated (AdwActionRow *row,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusCompressDialogController *controller;
|
||||
|
@ -279,7 +269,7 @@ tar_xz_row_on_activated (HdyActionRow *row,
|
|||
}
|
||||
|
||||
static void
|
||||
seven_zip_row_on_activated (HdyActionRow *row,
|
||||
seven_zip_row_on_activated (AdwActionRow *row,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusCompressDialogController *controller;
|
||||
|
@ -301,7 +291,7 @@ passphrase_entry_on_changed (GtkEditable *editable,
|
|||
self = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
|
||||
g_free (self->passphrase);
|
||||
self->passphrase = g_strdup (gtk_entry_get_text (GTK_ENTRY (self->passphrase_entry)));
|
||||
self->passphrase = g_strdup (gtk_editable_get_text (GTK_EDITABLE (self->passphrase_entry)));
|
||||
|
||||
/* Simulate a change of the name_entry to ensure the correct sensitivity of
|
||||
* the activate_button, but only if the name_entry is valid in order to
|
||||
|
@ -508,10 +498,10 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
|||
|
||||
if (initial_name != NULL)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (name_entry), initial_name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (name_entry), initial_name);
|
||||
}
|
||||
|
||||
gtk_widget_show_all (compress_dialog);
|
||||
gtk_widget_show (compress_dialog);
|
||||
|
||||
update_selected_format (self, format);
|
||||
|
||||
|
@ -533,7 +523,7 @@ nautilus_compress_dialog_controller_finalize (GObject *object)
|
|||
if (self->compress_dialog != NULL)
|
||||
{
|
||||
g_clear_signal_handler (&self->response_handler_id, self->compress_dialog);
|
||||
gtk_widget_destroy (self->compress_dialog);
|
||||
gtk_window_destroy (GTK_WINDOW (self->compress_dialog));
|
||||
self->compress_dialog = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "nautilus-dnd.h"
|
||||
|
||||
#include "nautilus-program-choosing.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
#include <eel/eel-glib-extensions.h>
|
||||
#include <eel/eel-string.h>
|
||||
#include <eel/eel-vfs-extensions.h>
|
||||
|
@ -414,7 +413,7 @@ nautilus_drag_get_source_data (GdkDragContext *context)
|
|||
NautilusWindowSlot *active_slot;
|
||||
NautilusView *view;
|
||||
|
||||
window = NAUTILUS_WINDOW (gtk_widget_get_toplevel (source_widget));
|
||||
window = NAUTILUS_WINDOW (gtk_widget_get_root (source_widget));
|
||||
active_slot = nautilus_window_get_active_slot (window);
|
||||
view = nautilus_window_slot_get_current_view (active_slot);
|
||||
if (NAUTILUS_IS_LIST_VIEW (view))
|
||||
|
|
|
@ -69,11 +69,11 @@ nautilus_file_conflict_dialog_set_text (NautilusFileConflictDialog *fcd,
|
|||
|
||||
void
|
||||
nautilus_file_conflict_dialog_set_images (NautilusFileConflictDialog *fcd,
|
||||
GdkPixbuf *destination_pixbuf,
|
||||
GdkPixbuf *source_pixbuf)
|
||||
GdkPaintable *destination_paintable,
|
||||
GdkPaintable *source_paintable)
|
||||
{
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (fcd->dest_image), destination_pixbuf);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (fcd->src_image), source_pixbuf);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (fcd->dest_image), destination_paintable);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (fcd->src_image), source_paintable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -97,7 +97,7 @@ nautilus_file_conflict_dialog_set_suggested_name (NautilusFileConflictDialog *fc
|
|||
gchar *suggested_name)
|
||||
{
|
||||
fcd->suggested_name = g_strdup (suggested_name);
|
||||
gtk_entry_set_text (GTK_ENTRY (fcd->entry), suggested_name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (fcd->entry), suggested_name);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -129,8 +129,8 @@ static void
|
|||
entry_text_changed_cb (GtkEditable *entry,
|
||||
NautilusFileConflictDialog *dialog)
|
||||
{
|
||||
if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (entry)), "") != 0 &&
|
||||
g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (entry)), dialog->conflict_name) != 0)
|
||||
if (g_strcmp0 (gtk_editable_get_text (GTK_EDITABLE (entry)), "") != 0 &&
|
||||
g_strcmp0 (gtk_editable_get_text (GTK_EDITABLE (entry)), dialog->conflict_name) != 0)
|
||||
{
|
||||
gtk_widget_set_sensitive (dialog->rename_button, TRUE);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ on_expanded_notify (GtkExpander *w,
|
|||
gtk_widget_set_sensitive (dialog->checkbox, FALSE);
|
||||
|
||||
gtk_widget_grab_focus (dialog->entry);
|
||||
if (g_strcmp0 (gtk_entry_get_text (GTK_ENTRY (dialog->entry)), dialog->suggested_name) == 0)
|
||||
if (g_strcmp0 (gtk_editable_get_text (GTK_EDITABLE (dialog->entry)), dialog->suggested_name) == 0)
|
||||
{
|
||||
/* The suggested name is in the form "original (1).txt", if the
|
||||
* the conflicting name was "original.txt". The user may want to
|
||||
|
@ -198,10 +198,10 @@ on_expanded_notify (GtkExpander *w,
|
|||
}
|
||||
|
||||
static void
|
||||
checkbox_toggled_cb (GtkToggleButton *t,
|
||||
checkbox_toggled_cb (GtkCheckButton *t,
|
||||
NautilusFileConflictDialog *dialog)
|
||||
{
|
||||
gtk_widget_set_sensitive (dialog->expander, !gtk_toggle_button_get_active (t));
|
||||
gtk_widget_set_sensitive (dialog->expander, !gtk_check_button_get_active (t));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -210,7 +210,7 @@ reset_button_clicked_cb (GtkButton *w,
|
|||
{
|
||||
int start_pos, end_pos;
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (dialog->entry), dialog->conflict_name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (dialog->entry), dialog->conflict_name);
|
||||
gtk_widget_grab_focus (dialog->entry);
|
||||
eel_filename_get_rename_region (dialog->conflict_name, &start_pos, &end_pos);
|
||||
gtk_editable_select_region (GTK_EDITABLE (dialog->entry), start_pos, end_pos);
|
||||
|
@ -288,13 +288,13 @@ nautilus_file_conflict_dialog_delay_buttons_activation (NautilusFileConflictDial
|
|||
char *
|
||||
nautilus_file_conflict_dialog_get_new_name (NautilusFileConflictDialog *dialog)
|
||||
{
|
||||
return g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->entry)));
|
||||
return g_strdup (gtk_editable_get_text (GTK_EDITABLE (dialog->entry)));
|
||||
}
|
||||
|
||||
gboolean
|
||||
nautilus_file_conflict_dialog_get_apply_to_all (NautilusFileConflictDialog *dialog)
|
||||
{
|
||||
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->checkbox));
|
||||
return gtk_check_button_get_active (GTK_CHECK_BUTTON (dialog->checkbox));
|
||||
}
|
||||
|
||||
NautilusFileConflictDialog *
|
||||
|
|
|
@ -38,8 +38,8 @@ void nautilus_file_conflict_dialog_set_text (NautilusFileConflictDialog *fcd,
|
|||
gchar *primary_text,
|
||||
gchar *secondary_text);
|
||||
void nautilus_file_conflict_dialog_set_images (NautilusFileConflictDialog *fcd,
|
||||
GdkPixbuf *source_pixbuf,
|
||||
GdkPixbuf *destination_pixbuf);
|
||||
GdkPaintable *source_paintable,
|
||||
GdkPaintable *destination_paintable);
|
||||
void nautilus_file_conflict_dialog_set_file_labels (NautilusFileConflictDialog *fcd,
|
||||
gchar *destination_label,
|
||||
gchar *source_label);
|
||||
|
|
|
@ -122,7 +122,7 @@ real_get_new_name (NautilusFileNameWidgetController *self)
|
|||
|
||||
priv = nautilus_file_name_widget_controller_get_instance_private (self);
|
||||
|
||||
return g_strstrip (g_strdup (gtk_entry_get_text (GTK_ENTRY (priv->name_entry))));
|
||||
return g_strstrip (g_strdup (gtk_editable_get_text (GTK_EDITABLE (priv->name_entry))));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -59,14 +59,13 @@
|
|||
#include "nautilus-file-undo-operations.h"
|
||||
#include "nautilus-file-undo-manager.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/x11/gdkx.h>
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
#include <gdk/gdkwayland.h>
|
||||
#include <gdk/wayland/gdkwayland.h>
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
|
@ -1243,13 +1242,13 @@ typedef struct
|
|||
} RunSimpleDialogData;
|
||||
|
||||
static void
|
||||
set_transient_for (GdkWindow *child_window,
|
||||
set_transient_for (GdkSurface *child_surface,
|
||||
const char *parent_handle)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
const char *prefix;
|
||||
|
||||
display = gdk_window_get_display (child_window);
|
||||
display = gdk_surface_get_display (child_surface);
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_DISPLAY (display))
|
||||
|
@ -1259,15 +1258,14 @@ set_transient_for (GdkWindow *child_window,
|
|||
if (g_str_has_prefix (parent_handle, prefix))
|
||||
{
|
||||
const char *handle;
|
||||
GdkWindow *window;
|
||||
GdkSurface *surface;
|
||||
|
||||
handle = parent_handle + strlen (prefix);
|
||||
window = gdk_x11_window_foreign_new_for_display (display, strtol (handle, NULL, 16));
|
||||
surface = gdk_x11_surface_lookup_for_display (display, strtol (handle, NULL, 16));
|
||||
|
||||
if (window != NULL)
|
||||
if (surface != NULL)
|
||||
{
|
||||
gdk_window_set_transient_for (child_window, window);
|
||||
g_object_unref (window);
|
||||
gdk_toplevel_set_transient_for (GDK_TOPLEVEL (child_surface), surface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1284,7 +1282,7 @@ set_transient_for (GdkWindow *child_window,
|
|||
|
||||
handle = parent_handle + strlen (prefix);
|
||||
|
||||
gdk_wayland_window_set_transient_for_exported (child_window, (char *) handle);
|
||||
gdk_wayland_toplevel_set_transient_for_exported (GDK_TOPLEVEL (child_surface), (char *) handle);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1298,7 +1296,7 @@ dialog_realize_cb (GtkWidget *widget,
|
|||
const char *parent_handle;
|
||||
|
||||
parent_handle = nautilus_file_operations_dbus_data_get_parent_handle (dbus_data);
|
||||
set_transient_for (gtk_widget_get_window (widget), parent_handle);
|
||||
set_transient_for (gtk_native_get_surface (gtk_widget_get_native (widget)), parent_handle);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -1327,7 +1325,7 @@ simple_dialog_cb (GtkDialog *dialog,
|
|||
return;
|
||||
}
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
|
||||
data->result = response_id;
|
||||
data->completed = TRUE;
|
||||
|
@ -1395,7 +1393,7 @@ do_run_simple_dialog (gpointer _data)
|
|||
content_area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog));
|
||||
|
||||
label = gtk_label_new (data->details_text);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
/* Ideally, we shouldn’t do this.
|
||||
|
@ -1431,7 +1429,7 @@ do_run_simple_dialog (gpointer _data)
|
|||
|
||||
/* Run it. */
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (simple_dialog_cb), data);
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -3080,7 +3078,7 @@ empty_trash_prompt_cb (GtkDialog *dialog,
|
|||
unmount_data_free (data);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3116,7 +3114,7 @@ nautilus_file_operations_unmount_mount_full (GtkWindow *parent_win
|
|||
dialog = create_empty_trash_prompt (parent_window);
|
||||
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (empty_trash_prompt_cb), data);
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -5378,17 +5378,30 @@ out:
|
|||
return icon;
|
||||
}
|
||||
|
||||
GdkPixbuf *
|
||||
nautilus_file_get_icon_pixbuf (NautilusFile *file,
|
||||
int size,
|
||||
int scale,
|
||||
NautilusFileIconFlags flags)
|
||||
GdkTexture *
|
||||
nautilus_file_get_icon_texture (NautilusFile *file,
|
||||
int size,
|
||||
int scale,
|
||||
NautilusFileIconFlags flags)
|
||||
{
|
||||
g_autoptr (NautilusIconInfo) info = NULL;
|
||||
|
||||
info = nautilus_file_get_icon (file, size, scale, flags);
|
||||
|
||||
return nautilus_icon_info_get_pixbuf_at_size (info, size);
|
||||
return nautilus_icon_info_get_texture (info);
|
||||
}
|
||||
|
||||
GdkPaintable *
|
||||
nautilus_file_get_icon_paintable (NautilusFile *file,
|
||||
int size,
|
||||
int scale,
|
||||
NautilusFileIconFlags flags)
|
||||
{
|
||||
g_autoptr (NautilusIconInfo) info = NULL;
|
||||
|
||||
info = nautilus_file_get_icon (file, size, scale, flags);
|
||||
|
||||
return nautilus_icon_info_get_paintable (info);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -473,7 +473,11 @@ NautilusIconInfo * nautilus_file_get_icon (Nautilu
|
|||
int size,
|
||||
int scale,
|
||||
NautilusFileIconFlags flags);
|
||||
GdkPixbuf * nautilus_file_get_icon_pixbuf (NautilusFile *file,
|
||||
GdkTexture * nautilus_file_get_icon_texture (NautilusFile *file,
|
||||
int size,
|
||||
int scale,
|
||||
NautilusFileIconFlags flags);
|
||||
GdkPaintable * nautilus_file_get_icon_paintable (NautilusFile *file,
|
||||
int size,
|
||||
int scale,
|
||||
NautilusFileIconFlags flags);
|
||||
|
|
|
@ -87,11 +87,10 @@
|
|||
#include "nautilus-view-icon-controller.h"
|
||||
#include "nautilus-window.h"
|
||||
#include "nautilus-tracker-utilities.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
#ifdef HAVE_LIBPORTAL
|
||||
#include <libportal/portal.h>
|
||||
#include <libportal-gtk3/portal-gtk3.h>
|
||||
#include <libportal-gtk4/portal-gtk4.h>
|
||||
#endif
|
||||
|
||||
/* Minimum starting update inverval */
|
||||
|
@ -521,8 +520,7 @@ remove_floating_bar_passthrough (gpointer data)
|
|||
NautilusFilesViewPrivate *priv;
|
||||
|
||||
priv = nautilus_files_view_get_instance_private (NAUTILUS_FILES_VIEW (data));
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (priv->overlay),
|
||||
priv->floating_bar, FALSE);
|
||||
gtk_widget_set_can_target (priv->floating_bar, TRUE);
|
||||
priv->floating_bar_set_passthrough_timeout_id = 0;
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
|
@ -546,7 +544,7 @@ set_floating_bar_status (NautilusFilesView *view,
|
|||
priv->floating_bar_set_status_timeout_id = 0;
|
||||
}
|
||||
|
||||
settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (view)));
|
||||
settings = gtk_settings_get_for_display (gtk_widget_get_display (GTK_WIDGET (view)));
|
||||
g_object_get (settings,
|
||||
"gtk-double-click-time", &double_click_time,
|
||||
NULL);
|
||||
|
@ -563,8 +561,7 @@ set_floating_bar_status (NautilusFilesView *view,
|
|||
}
|
||||
/* Activate passthrough on the floating bar just long enough for a
|
||||
* potential double click to happen, so to not interfere with it */
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (priv->overlay),
|
||||
priv->floating_bar, TRUE);
|
||||
gtk_widget_set_can_target (priv->floating_bar, FALSE);
|
||||
priv->floating_bar_set_passthrough_timeout_id = g_timeout_add ((guint) double_click_time,
|
||||
remove_floating_bar_passthrough,
|
||||
view);
|
||||
|
@ -1436,7 +1433,7 @@ app_chooser_dialog_response_cb (GtkDialog *dialog,
|
|||
|
||||
g_object_unref (info);
|
||||
out:
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1691,7 +1688,7 @@ pattern_select_response_cb (GtkWidget *dialog,
|
|||
entry = g_object_get_data (G_OBJECT (dialog), "entry");
|
||||
directory = nautilus_files_view_get_model (view);
|
||||
selection = nautilus_directory_match_pattern (directory,
|
||||
gtk_entry_get_text (GTK_ENTRY (entry)));
|
||||
gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||
|
||||
nautilus_files_view_call_set_selection (view, selection);
|
||||
nautilus_files_view_reveal_selection (view);
|
||||
|
@ -1707,7 +1704,7 @@ pattern_select_response_cb (GtkWidget *dialog,
|
|||
case GTK_RESPONSE_DELETE_EVENT:
|
||||
case GTK_RESPONSE_CANCEL:
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -3123,7 +3120,7 @@ slot_active_changed (NautilusWindowSlot *slot,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
nautilus_files_view_grab_focus (GtkWidget *widget)
|
||||
{
|
||||
/* focus the child of the scrolled window if it exists */
|
||||
|
@ -3135,12 +3132,12 @@ nautilus_files_view_grab_focus (GtkWidget *widget)
|
|||
priv = nautilus_files_view_get_instance_private (view);
|
||||
child = gtk_scrolled_window_get_child (GTK_SCROLLED_WINDOW (priv->scrolled_window));
|
||||
|
||||
GTK_WIDGET_CLASS (nautilus_files_view_parent_class)->grab_focus (widget);
|
||||
|
||||
if (child)
|
||||
if (child != NULL)
|
||||
{
|
||||
gtk_widget_grab_focus (GTK_WIDGET (child));
|
||||
return gtk_widget_grab_focus (GTK_WIDGET (child));
|
||||
}
|
||||
|
||||
return GTK_WIDGET_CLASS (nautilus_files_view_parent_class)->grab_focus (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3191,6 +3188,9 @@ nautilus_files_view_dispose (GObject *object)
|
|||
priv->in_destruction = TRUE;
|
||||
nautilus_files_view_stop_loading (view);
|
||||
|
||||
g_clear_pointer (&priv->selection_menu, gtk_widget_unparent);
|
||||
g_clear_pointer (&priv->background_menu, gtk_widget_unparent);
|
||||
|
||||
if (priv->model)
|
||||
{
|
||||
nautilus_directory_unref (priv->model);
|
||||
|
@ -4872,13 +4872,13 @@ nautilus_files_view_get_directory_as_file (NautilusFilesView *view)
|
|||
return priv->directory_as_file;
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
static GdkTexture *
|
||||
get_menu_icon_for_file (NautilusFile *file,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
int scale = gtk_widget_get_scale_factor (widget);
|
||||
|
||||
return nautilus_file_get_icon_pixbuf (file, 16, scale, 0);
|
||||
return nautilus_file_get_icon_texture (file, 16, scale, 0);
|
||||
}
|
||||
|
||||
static GList *
|
||||
|
@ -5284,7 +5284,7 @@ add_script_to_scripts_menus (NautilusFilesView *view,
|
|||
gchar *name;
|
||||
g_autofree gchar *uri = NULL;
|
||||
g_autofree gchar *escaped_uri = NULL;
|
||||
GdkPixbuf *mimetype_icon;
|
||||
GdkTexture *mimetype_icon;
|
||||
gchar *action_name, *detailed_action_name;
|
||||
ScriptLaunchParameters *launch_parameters;
|
||||
GAction *action;
|
||||
|
@ -5529,7 +5529,7 @@ add_template_to_templates_menus (NautilusFilesView *view,
|
|||
NautilusFilesViewPrivate *priv;
|
||||
char *tmp, *uri, *name;
|
||||
g_autofree gchar *escaped_uri = NULL;
|
||||
GdkPixbuf *mimetype_icon;
|
||||
GdkTexture *mimetype_icon;
|
||||
char *action_name, *detailed_action_name;
|
||||
CreateTemplateParameters *parameters;
|
||||
GAction *action;
|
||||
|
@ -5862,7 +5862,7 @@ on_destination_dialog_response (GtkDialog *dialog,
|
|||
}
|
||||
|
||||
copy_data_free (copy_data);
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5896,7 +5896,6 @@ copy_or_move_selection (NautilusFilesView *view,
|
|||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Select"), GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), FALSE);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK);
|
||||
|
@ -5923,12 +5922,12 @@ copy_or_move_selection (NautilusFilesView *view,
|
|||
location = nautilus_directory_get_location (priv->model);
|
||||
}
|
||||
|
||||
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog), location, NULL);
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), location, NULL);
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (on_destination_dialog_response),
|
||||
copy_data);
|
||||
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -6115,18 +6114,14 @@ real_action_rename (NautilusFilesView *view)
|
|||
/* If there is more than one file selected, invoke a batch renamer */
|
||||
if (selection->next != NULL)
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
GdkDisplay *display;
|
||||
NautilusWindow *window;
|
||||
|
||||
display = gtk_widget_get_display (GTK_WIDGET (nautilus_files_view_get_window (view)));
|
||||
cursor = gdk_cursor_new_from_name (display, "progress");
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (nautilus_files_view_get_window (view))),
|
||||
cursor);
|
||||
g_object_unref (cursor);
|
||||
window = nautilus_files_view_get_window (view);
|
||||
gtk_widget_set_cursor_from_name (GTK_WIDGET (window), "progress");
|
||||
|
||||
dialog = nautilus_batch_rename_dialog_new (selection,
|
||||
nautilus_files_view_get_model (view),
|
||||
nautilus_files_view_get_window (view));
|
||||
window);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (dialog));
|
||||
}
|
||||
|
@ -6319,7 +6314,7 @@ on_extract_destination_dialog_response (GtkDialog *dialog,
|
|||
extract_files (data->view, data->files, destination_directory);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
nautilus_file_list_free (data->files);
|
||||
g_free (data);
|
||||
}
|
||||
|
@ -6348,7 +6343,6 @@ extract_files_to_chosen_location (NautilusFilesView *view,
|
|||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Select"), GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), FALSE);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK);
|
||||
|
@ -6374,7 +6368,7 @@ extract_files_to_chosen_location (NautilusFilesView *view,
|
|||
location = nautilus_directory_get_location (priv->model);
|
||||
}
|
||||
|
||||
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog), location, NULL);
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), location, NULL);
|
||||
|
||||
data->view = view;
|
||||
data->files = nautilus_file_list_copy (files);
|
||||
|
@ -6383,7 +6377,7 @@ extract_files_to_chosen_location (NautilusFilesView *view,
|
|||
G_CALLBACK (on_extract_destination_dialog_response),
|
||||
data);
|
||||
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -8269,12 +8263,13 @@ nautilus_files_view_pop_up_selection_context_menu (NautilusFilesView *view,
|
|||
|
||||
if (NULL == priv->selection_menu)
|
||||
{
|
||||
priv->selection_menu = gtk_popover_new (GTK_WIDGET (view));
|
||||
priv->selection_menu = gtk_popover_menu_new_from_model (NULL);
|
||||
gtk_widget_set_parent (priv->selection_menu, GTK_WIDGET (view));
|
||||
g_signal_connect (priv->selection_menu, "destroy", G_CALLBACK (gtk_widget_unparent), NULL);
|
||||
}
|
||||
|
||||
gtk_popover_bind_model (GTK_POPOVER (priv->selection_menu),
|
||||
G_MENU_MODEL (priv->selection_menu_model),
|
||||
NULL);
|
||||
gtk_popover_menu_set_menu_model (GTK_POPOVER_MENU (priv->selection_menu),
|
||||
G_MENU_MODEL (priv->selection_menu_model));
|
||||
if (x == -1 && y == -1)
|
||||
{
|
||||
/* If triggered from the keyboard, popup at selection, not pointer */
|
||||
|
@ -8316,13 +8311,16 @@ nautilus_files_view_pop_up_background_context_menu (NautilusFilesView *view,
|
|||
*/
|
||||
update_context_menus_if_pending (view);
|
||||
|
||||
|
||||
if (NULL == priv->background_menu)
|
||||
{
|
||||
priv->background_menu = gtk_popover_new (GTK_WIDGET (view));
|
||||
priv->background_menu = gtk_popover_menu_new_from_model (NULL);
|
||||
gtk_widget_set_parent (priv->background_menu, GTK_WIDGET (view));
|
||||
g_signal_connect (priv->background_menu, "destroy", G_CALLBACK (gtk_widget_unparent), NULL);
|
||||
}
|
||||
gtk_popover_bind_model (GTK_POPOVER (priv->background_menu),
|
||||
G_MENU_MODEL (priv->background_menu_model),
|
||||
NULL);
|
||||
gtk_popover_menu_set_menu_model (GTK_POPOVER_MENU (priv->background_menu),
|
||||
G_MENU_MODEL (priv->background_menu_model));
|
||||
|
||||
gtk_popover_set_pointing_to (GTK_POPOVER (priv->background_menu),
|
||||
&(GdkRectangle){x, y, 0, 0});
|
||||
gtk_popover_popup (GTK_POPOVER (priv->background_menu));
|
||||
|
@ -9118,42 +9116,26 @@ nautilus_files_view_set_property (GObject *object,
|
|||
|
||||
/* handle Ctrl+Scroll, which will cause a zoom-in/out */
|
||||
static gboolean
|
||||
on_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
on_scroll (GtkEventControllerScroll *scroll,
|
||||
gdouble dx,
|
||||
gdouble dy,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusFilesView *directory_view;
|
||||
static gdouble total_delta_y = 0;
|
||||
GdkModifierType state;
|
||||
GdkScrollDirection direction;
|
||||
gdouble delta_x, delta_y;
|
||||
|
||||
directory_view = NAUTILUS_FILES_VIEW (widget);
|
||||
directory_view = NAUTILUS_FILES_VIEW (user_data);
|
||||
|
||||
if (gdk_event_get_event_type (event) != GDK_SCROLL)
|
||||
state = gtk_event_controller_get_current_event_state (GTK_EVENT_CONTROLLER (scroll));
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
if (!gdk_event_get_state (event, &state))
|
||||
{
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
if (!(state & GDK_CONTROL_MASK))
|
||||
{
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
if (gdk_event_get_scroll_direction (event, &direction))
|
||||
{
|
||||
if (direction == GDK_SCROLL_UP)
|
||||
if (dy <= -1)
|
||||
{
|
||||
/* Zoom In */
|
||||
nautilus_files_view_bump_zoom_level (directory_view, 1);
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
else if (direction == GDK_SCROLL_DOWN)
|
||||
else if (dy >= 1)
|
||||
{
|
||||
/* Zoom Out */
|
||||
nautilus_files_view_bump_zoom_level (directory_view, -1);
|
||||
|
@ -9161,32 +9143,6 @@ on_event (GtkWidget *widget,
|
|||
}
|
||||
}
|
||||
|
||||
if (gdk_event_get_scroll_deltas (event, &delta_x, &delta_y))
|
||||
{
|
||||
/* try to emulate a normal scrolling event by summing deltas */
|
||||
total_delta_y += delta_y;
|
||||
|
||||
if (total_delta_y >= 1)
|
||||
{
|
||||
total_delta_y = 0;
|
||||
/* emulate scroll down */
|
||||
nautilus_files_view_bump_zoom_level (directory_view, -1);
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
else if (total_delta_y <= -1)
|
||||
{
|
||||
total_delta_y = 0;
|
||||
/* emulate scroll up */
|
||||
nautilus_files_view_bump_zoom_level (directory_view, 1);
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* eat event */
|
||||
return GDK_EVENT_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
|
@ -9508,6 +9464,7 @@ nautilus_files_view_init (NautilusFilesView *view)
|
|||
#endif
|
||||
NautilusDirectory *scripts_directory;
|
||||
NautilusDirectory *templates_directory;
|
||||
GtkEventController *controller;
|
||||
gchar *templates_uri;
|
||||
#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
|
||||
GtkClipboard *clipboard;
|
||||
|
@ -9594,24 +9551,18 @@ nautilus_files_view_init (NautilusFilesView *view)
|
|||
gtk_grid_attach_next_to (GTK_GRID (view), priv->overlay, NULL, GTK_POS_BOTTOM, 1, 1);
|
||||
gtk_widget_show (priv->overlay);
|
||||
|
||||
/* NautilusFloatingBar listen to its parent's 'event' signal
|
||||
* and GtkOverlay doesn't have it enabled by default, so we have to add them
|
||||
* here.
|
||||
*/
|
||||
gtk_widget_add_events (GTK_WIDGET (priv->overlay),
|
||||
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
|
||||
|
||||
/* Scrolled Window */
|
||||
priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
priv->scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_show (priv->scrolled_window);
|
||||
|
||||
g_signal_connect_swapped (priv->scrolled_window,
|
||||
"event",
|
||||
G_CALLBACK (on_event),
|
||||
view);
|
||||
controller = gtk_event_controller_scroll_new (GTK_EVENT_CONTROLLER_SCROLL_VERTICAL |
|
||||
GTK_EVENT_CONTROLLER_SCROLL_DISCRETE);
|
||||
gtk_widget_add_controller (priv->scrolled_window, controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
g_signal_connect (controller, "scroll", G_CALLBACK (on_scroll), view);
|
||||
|
||||
gtk_overlay_set_child (GTK_OVERLAY (priv->overlay), priv->scrolled_window);
|
||||
|
||||
|
@ -9619,33 +9570,25 @@ nautilus_files_view_init (NautilusFilesView *view)
|
|||
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-no-search-results.ui");
|
||||
priv->no_search_results_widget = GTK_WIDGET (gtk_builder_get_object (builder, "no_search_results"));
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (priv->overlay), priv->no_search_results_widget);
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (priv->overlay),
|
||||
priv->no_search_results_widget,
|
||||
TRUE);
|
||||
gtk_widget_set_can_target (priv->no_search_results_widget, FALSE);
|
||||
g_object_unref (builder);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-folder-is-empty.ui");
|
||||
priv->folder_is_empty_widget = GTK_WIDGET (gtk_builder_get_object (builder, "folder_is_empty"));
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (priv->overlay), priv->folder_is_empty_widget);
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (priv->overlay),
|
||||
priv->folder_is_empty_widget,
|
||||
TRUE);
|
||||
gtk_widget_set_can_target (priv->folder_is_empty_widget, FALSE);
|
||||
g_object_unref (builder);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-starred-is-empty.ui");
|
||||
priv->starred_is_empty_widget = GTK_WIDGET (gtk_builder_get_object (builder, "starred_is_empty"));
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (priv->overlay), priv->starred_is_empty_widget);
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (priv->overlay),
|
||||
priv->starred_is_empty_widget,
|
||||
TRUE);
|
||||
gtk_widget_set_can_target (priv->starred_is_empty_widget, FALSE);
|
||||
g_object_unref (builder);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-trash-is-empty.ui");
|
||||
priv->trash_is_empty_widget = GTK_WIDGET (gtk_builder_get_object (builder, "trash_is_empty"));
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (priv->overlay), priv->trash_is_empty_widget);
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (priv->overlay),
|
||||
priv->trash_is_empty_widget,
|
||||
TRUE);
|
||||
gtk_widget_set_can_target (priv->trash_is_empty_widget, FALSE);
|
||||
g_object_unref (builder);
|
||||
|
||||
/* Floating bar */
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "nautilus-floating-bar.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
#define HOVER_HIDE_TIMEOUT_INTERVAL 100
|
||||
|
||||
|
@ -246,7 +245,7 @@ on_event_controller_motion_enter (GtkEventControllerMotion *controller,
|
|||
NautilusFloatingBar *self = NAUTILUS_FLOATING_BAR (user_data);
|
||||
GtkWidget *parent;
|
||||
CheckPointerData *data;
|
||||
gint y_pos;
|
||||
gdouble y_pos;
|
||||
|
||||
self->pointer_y_in_parent_coordinates = y;
|
||||
|
||||
|
@ -310,11 +309,25 @@ on_parent_changed (GObject *object,
|
|||
|
||||
parent = gtk_widget_get_parent (GTK_WIDGET (object));
|
||||
|
||||
g_clear_object (&self->motion_controller);
|
||||
if (self->motion_controller != NULL)
|
||||
{
|
||||
GtkWidget *old_parent;
|
||||
|
||||
old_parent = gtk_event_controller_get_widget (self->motion_controller);
|
||||
g_warn_if_fail (old_parent != NULL);
|
||||
if (old_parent != NULL)
|
||||
{
|
||||
gtk_widget_remove_controller (old_parent, self->motion_controller);
|
||||
}
|
||||
|
||||
g_object_unref (self->motion_controller);
|
||||
self->motion_controller = NULL;
|
||||
}
|
||||
|
||||
if (parent != NULL)
|
||||
{
|
||||
self->motion_controller = gtk_event_controller_motion_new (parent);
|
||||
self->motion_controller = g_object_ref (gtk_event_controller_motion_new ());
|
||||
gtk_widget_add_controller (parent, self->motion_controller);
|
||||
|
||||
gtk_event_controller_set_propagation_phase (self->motion_controller,
|
||||
GTK_PHASE_CAPTURE);
|
||||
|
@ -345,7 +358,7 @@ nautilus_floating_bar_constructed (GObject *obj)
|
|||
* ensure the spinner animates if and only if it's visible, to reduce CPU
|
||||
* usage. */
|
||||
g_object_bind_property (obj, "show-spinner",
|
||||
w, "active",
|
||||
w, "spinning",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
self->spinner = w;
|
||||
|
||||
|
@ -376,7 +389,7 @@ nautilus_floating_bar_constructed (GObject *obj)
|
|||
self->details_label_widget = w;
|
||||
gtk_widget_show (w);
|
||||
|
||||
w = gtk_button_new_from_icon_name ("process-stop-symbolic", GTK_ICON_SIZE_MENU);
|
||||
w = gtk_button_new_from_icon_name ("process-stop-symbolic");
|
||||
context = gtk_widget_get_style_context (w);
|
||||
gtk_style_context_add_class (context, "circular");
|
||||
gtk_style_context_add_class (context, "flat");
|
||||
|
@ -384,7 +397,6 @@ nautilus_floating_bar_constructed (GObject *obj)
|
|||
gtk_box_append (GTK_BOX (self), w);
|
||||
self->stop_button = w;
|
||||
gtk_widget_set_visible (w, FALSE);
|
||||
gtk_widget_set_no_show_all (w, TRUE);
|
||||
|
||||
g_signal_connect (self->stop_button, "clicked",
|
||||
G_CALLBACK (stop_button_clicked_cb), self);
|
||||
|
|
|
@ -1,218 +0,0 @@
|
|||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
void
|
||||
adw_bin_set_child (AdwBin *bin,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_BIN (bin));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (bin), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_button_set_child (GtkButton *button,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_BUTTON (button));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (button), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_menu_button_set_child (GtkMenuButton *menu_button,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_MENU_BUTTON (menu_button));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (menu_button), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_box_append (GtkBox *box,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_BOX (box));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (box), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_box_remove (GtkBox *box,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_BOX (box));
|
||||
|
||||
gtk_container_remove (GTK_CONTAINER (box), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_overlay_set_child (GtkOverlay *overlay,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_OVERLAY (overlay));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (overlay), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_scrolled_window_set_child (GtkScrolledWindow *scrolled_window,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_SCROLLED_WINDOW (scrolled_window));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_list_box_row_set_child (GtkListBoxRow *row,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_LIST_BOX_ROW (row));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (row), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_info_bar_add_child (GtkInfoBar *info_bar,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
g_assert (GTK_IS_INFO_BAR (info_bar));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (info_bar)),
|
||||
widget);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_revealer_set_child (GtkRevealer *revealer,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_REVEALER (revealer));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (revealer), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_popover_set_child (GtkPopover *popover,
|
||||
GtkWidget *child)
|
||||
{
|
||||
g_assert (GTK_IS_POPOVER (popover));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (popover), child);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_check_button_set_active (GtkCheckButton *button,
|
||||
gboolean setting)
|
||||
{
|
||||
g_assert (GTK_IS_CHECK_BUTTON (button));
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), setting);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gtk_center_box_set_start_widget (GtkCenterBox *center_box,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
g_assert (GTK_IS_BOX (center_box));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (center_box), widget, FALSE, TRUE, 0);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_center_box_set_center_widget (GtkCenterBox *center_box,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
g_assert (GTK_IS_BOX (center_box));
|
||||
|
||||
gtk_box_set_center_widget (GTK_BOX (center_box), widget);
|
||||
}
|
||||
void
|
||||
gtk_center_box_set_end_widget (GtkCenterBox *center_box,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
g_assert (GTK_IS_BOX (center_box));
|
||||
|
||||
gtk_box_pack_end (GTK_BOX (center_box), widget, FALSE, TRUE, 0);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_center_box_new (void)
|
||||
{
|
||||
return gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_check_button_get_active (GtkCheckButton *button)
|
||||
{
|
||||
g_assert (GTK_IS_CHECK_BUTTON (button));
|
||||
|
||||
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_widget_get_first_child (GtkWidget *widget)
|
||||
{
|
||||
g_autoptr (GList) children = NULL;
|
||||
|
||||
g_assert (GTK_IS_CONTAINER (widget));
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (widget));
|
||||
if (children != NULL)
|
||||
{
|
||||
return GTK_WIDGET (children->data);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_widget_get_focus_child (GtkWidget *widget)
|
||||
{
|
||||
g_assert (GTK_IS_CONTAINER (widget));
|
||||
|
||||
return gtk_container_get_focus_child (GTK_CONTAINER (widget));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_scrolled_window_get_child (GtkScrolledWindow *scrolled)
|
||||
{
|
||||
g_assert (GTK_IS_SCROLLED_WINDOW (scrolled));
|
||||
|
||||
return gtk_bin_get_child (GTK_BIN (scrolled));
|
||||
}
|
||||
|
||||
GdkDisplay *
|
||||
gtk_root_get_display (GtkRoot *root)
|
||||
{
|
||||
g_assert (GTK_IS_WINDOW (root));
|
||||
|
||||
return gdk_screen_get_display (gtk_window_get_screen (GTK_WINDOW (root)));
|
||||
}
|
||||
|
||||
void
|
||||
gtk_window_set_display (GtkWindow *window,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
g_assert (GTK_IS_WINDOW (window));
|
||||
|
||||
gtk_window_set_screen (window, gdk_display_get_default_screen (display));
|
||||
}
|
||||
|
||||
void
|
||||
gtk_style_context_add_provider_for_display (GdkDisplay *display,
|
||||
GtkStyleProvider *provider,
|
||||
guint priority)
|
||||
{
|
||||
gtk_style_context_add_provider_for_screen (gdk_display_get_default_screen (display),
|
||||
provider,
|
||||
priority);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_style_context_remove_provider_for_display (GdkDisplay *display,
|
||||
GtkStyleProvider *provider)
|
||||
{
|
||||
gtk_style_context_remove_provider_for_screen (gdk_display_get_default_screen (display),
|
||||
provider);
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
#if GTK_MAJOR_VERSION < 4
|
||||
|
||||
#define AdwBin GtkBin
|
||||
#define ADW_BIN GTK_BIN
|
||||
#define GtkCenterBox GtkBox
|
||||
#define GTK_CENTER_BOX GTK_BOX
|
||||
|
||||
void adw_bin_set_child (AdwBin *bin,
|
||||
GtkWidget *child);
|
||||
void gtk_button_set_child (GtkButton *button,
|
||||
GtkWidget *child);
|
||||
void gtk_menu_button_set_child (GtkMenuButton *menu_button,
|
||||
GtkWidget *child);
|
||||
void gtk_box_append (GtkBox *box,
|
||||
GtkWidget *child);
|
||||
void gtk_box_remove (GtkBox *box,
|
||||
GtkWidget *child);
|
||||
void gtk_overlay_set_child (GtkOverlay *overlay,
|
||||
GtkWidget *child);
|
||||
void gtk_scrolled_window_set_child (GtkScrolledWindow *scrolled_window,
|
||||
GtkWidget *child);
|
||||
void gtk_list_box_row_set_child (GtkListBoxRow *row,
|
||||
GtkWidget *child);
|
||||
void gtk_info_bar_add_child (GtkInfoBar *info_bar,
|
||||
GtkWidget *widget);
|
||||
void gtk_revealer_set_child (GtkRevealer *revealer,
|
||||
GtkWidget *child);
|
||||
void gtk_popover_set_child (GtkPopover *popover,
|
||||
GtkWidget *child);
|
||||
void gtk_check_button_set_active (GtkCheckButton *button,
|
||||
gboolean setting);
|
||||
void gtk_center_box_set_start_widget (GtkCenterBox *center_box,
|
||||
GtkWidget *widget);
|
||||
void gtk_center_box_set_center_widget (GtkCenterBox *center_box,
|
||||
GtkWidget *widget);
|
||||
void gtk_center_box_set_end_widget (GtkCenterBox *center_box,
|
||||
GtkWidget *widget);
|
||||
|
||||
GtkWidget *gtk_center_box_new (void);
|
||||
|
||||
gboolean gtk_check_button_get_active (GtkCheckButton *button);
|
||||
GtkWidget *gtk_widget_get_first_child (GtkWidget *widget);
|
||||
GtkWidget *gtk_widget_get_focus_child (GtkWidget *widget);
|
||||
GtkWidget *gtk_scrolled_window_get_child (GtkScrolledWindow *scrolled);
|
||||
|
||||
void gtk_style_context_add_provider_for_display (GdkDisplay *display,
|
||||
GtkStyleProvider *provider,
|
||||
guint priority);
|
||||
void gtk_style_context_remove_provider_for_display (GdkDisplay *display,
|
||||
GtkStyleProvider *provider);
|
||||
|
||||
#define GTK_ROOT(root) ((GtkRoot *) GTK_WINDOW (root))
|
||||
typedef GtkWindow GtkRoot;
|
||||
GdkDisplay *gtk_root_get_display (GtkRoot *root);
|
||||
void gtk_window_set_display (GtkWindow *window,
|
||||
GdkDisplay *display);
|
||||
|
||||
#endif
|
||||
G_END_DECLS
|
|
@ -25,7 +25,7 @@ struct _NautilusIconInfo
|
|||
|
||||
gboolean sole_owner;
|
||||
gint64 last_use_time;
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkPaintable *paintable;
|
||||
|
||||
char *icon_name;
|
||||
|
||||
|
@ -48,13 +48,13 @@ nautilus_icon_info_init (NautilusIconInfo *icon)
|
|||
gboolean
|
||||
nautilus_icon_info_is_fallback (NautilusIconInfo *icon)
|
||||
{
|
||||
return icon->pixbuf == NULL;
|
||||
return icon->paintable == NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
pixbuf_toggle_notify (gpointer info,
|
||||
GObject *object,
|
||||
gboolean is_last_ref)
|
||||
paintable_toggle_notify (gpointer info,
|
||||
GObject *object,
|
||||
gboolean is_last_ref)
|
||||
{
|
||||
NautilusIconInfo *icon = info;
|
||||
|
||||
|
@ -62,7 +62,7 @@ pixbuf_toggle_notify (gpointer info,
|
|||
{
|
||||
icon->sole_owner = TRUE;
|
||||
g_object_remove_toggle_ref (object,
|
||||
pixbuf_toggle_notify,
|
||||
paintable_toggle_notify,
|
||||
info);
|
||||
icon->last_use_time = g_get_monotonic_time ();
|
||||
schedule_reap_cache ();
|
||||
|
@ -76,16 +76,16 @@ nautilus_icon_info_finalize (GObject *object)
|
|||
|
||||
icon = NAUTILUS_ICON_INFO (object);
|
||||
|
||||
if (!icon->sole_owner && icon->pixbuf)
|
||||
if (!icon->sole_owner && icon->paintable)
|
||||
{
|
||||
g_object_remove_toggle_ref (G_OBJECT (icon->pixbuf),
|
||||
pixbuf_toggle_notify,
|
||||
g_object_remove_toggle_ref (G_OBJECT (icon->paintable),
|
||||
paintable_toggle_notify,
|
||||
icon);
|
||||
}
|
||||
|
||||
if (icon->pixbuf)
|
||||
if (icon->paintable)
|
||||
{
|
||||
g_object_unref (icon->pixbuf);
|
||||
g_object_unref (icon->paintable);
|
||||
}
|
||||
g_free (icon->icon_name);
|
||||
|
||||
|
@ -112,7 +112,7 @@ nautilus_icon_info_new_for_pixbuf (GdkPixbuf *pixbuf,
|
|||
|
||||
if (pixbuf)
|
||||
{
|
||||
icon->pixbuf = g_object_ref (pixbuf);
|
||||
icon->paintable = GDK_PAINTABLE (gdk_texture_new_for_pixbuf (pixbuf));
|
||||
}
|
||||
|
||||
icon->orig_scale = scale;
|
||||
|
@ -121,21 +121,21 @@ nautilus_icon_info_new_for_pixbuf (GdkPixbuf *pixbuf,
|
|||
}
|
||||
|
||||
static NautilusIconInfo *
|
||||
nautilus_icon_info_new_for_icon_info (GtkIconInfo *icon_info,
|
||||
gint scale)
|
||||
nautilus_icon_info_new_for_icon_paintable (GtkIconPaintable *icon_paintable,
|
||||
gint scale)
|
||||
{
|
||||
NautilusIconInfo *icon;
|
||||
const char *filename;
|
||||
g_autoptr (GFile) file = NULL;
|
||||
char *basename, *p;
|
||||
|
||||
icon = g_object_new (NAUTILUS_TYPE_ICON_INFO, NULL);
|
||||
|
||||
icon->pixbuf = gtk_icon_info_load_icon (icon_info, NULL);
|
||||
icon->paintable = GDK_PAINTABLE (g_object_ref (icon_paintable));
|
||||
|
||||
filename = gtk_icon_info_get_filename (icon_info);
|
||||
if (filename != NULL)
|
||||
file = gtk_icon_paintable_get_file (icon_paintable);
|
||||
if (file != NULL)
|
||||
{
|
||||
basename = g_path_get_basename (filename);
|
||||
basename = g_file_get_basename (file);
|
||||
p = strrchr (basename, '.');
|
||||
if (p)
|
||||
{
|
||||
|
@ -143,6 +143,10 @@ nautilus_icon_info_new_for_icon_info (GtkIconInfo *icon_info,
|
|||
}
|
||||
icon->icon_name = basename;
|
||||
}
|
||||
else
|
||||
{
|
||||
icon->icon_name = g_strdup (gtk_icon_paintable_get_icon_name (icon_paintable));
|
||||
}
|
||||
|
||||
icon->orig_scale = scale;
|
||||
|
||||
|
@ -159,7 +163,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
char *filename;
|
||||
char *icon_name;
|
||||
int scale;
|
||||
int size;
|
||||
} ThemedIconKey;
|
||||
|
@ -296,7 +300,7 @@ loadable_icon_key_free (LoadableIconKey *key)
|
|||
static guint
|
||||
themed_icon_key_hash (ThemedIconKey *key)
|
||||
{
|
||||
return g_str_hash (key->filename) ^ key->size;
|
||||
return g_str_hash (key->icon_name) ^ key->size;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -305,18 +309,18 @@ themed_icon_key_equal (const ThemedIconKey *a,
|
|||
{
|
||||
return a->size == b->size &&
|
||||
a->scale == b->scale &&
|
||||
g_str_equal (a->filename, b->filename);
|
||||
g_str_equal (a->icon_name, b->icon_name);
|
||||
}
|
||||
|
||||
static ThemedIconKey *
|
||||
themed_icon_key_new (const char *filename,
|
||||
themed_icon_key_new (const char *icon_name,
|
||||
int scale,
|
||||
int size)
|
||||
{
|
||||
ThemedIconKey *key;
|
||||
|
||||
key = g_slice_new (ThemedIconKey);
|
||||
key->filename = g_strdup (filename);
|
||||
key->icon_name = g_strdup (icon_name);
|
||||
key->scale = scale;
|
||||
key->size = size;
|
||||
|
||||
|
@ -326,7 +330,7 @@ themed_icon_key_new (const char *filename,
|
|||
static void
|
||||
themed_icon_key_free (ThemedIconKey *key)
|
||||
{
|
||||
g_free (key->filename);
|
||||
g_free (key->icon_name);
|
||||
g_slice_free (ThemedIconKey, key);
|
||||
}
|
||||
|
||||
|
@ -336,7 +340,7 @@ nautilus_icon_info_lookup (GIcon *icon,
|
|||
int scale)
|
||||
{
|
||||
NautilusIconInfo *icon_info;
|
||||
g_autoptr (GtkIconInfo) gtkicon_info = NULL;
|
||||
g_autoptr (GtkIconPaintable) icon_paintable = NULL;
|
||||
|
||||
if (G_IS_LOADABLE_ICON (icon))
|
||||
{
|
||||
|
@ -386,9 +390,9 @@ nautilus_icon_info_lookup (GIcon *icon,
|
|||
return g_object_ref (icon_info);
|
||||
}
|
||||
|
||||
gtkicon_info = gtk_icon_theme_lookup_by_gicon_for_scale (gtk_icon_theme_get_default (),
|
||||
icon, size, scale, 0);
|
||||
if (gtkicon_info == NULL)
|
||||
icon_paintable = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_for_display (gdk_display_get_default ()),
|
||||
icon, size, scale, GTK_TEXT_DIR_NONE, 0);
|
||||
if (icon_paintable == NULL)
|
||||
{
|
||||
return nautilus_icon_info_new_for_pixbuf (NULL, scale);
|
||||
}
|
||||
|
@ -397,7 +401,7 @@ nautilus_icon_info_lookup (GIcon *icon,
|
|||
{
|
||||
ThemedIconKey lookup_key;
|
||||
ThemedIconKey *key;
|
||||
const char *filename;
|
||||
const char *icon_name;
|
||||
|
||||
if (themed_icon_cache == NULL)
|
||||
{
|
||||
|
@ -408,23 +412,18 @@ nautilus_icon_info_lookup (GIcon *icon,
|
|||
(GDestroyNotify) g_object_unref);
|
||||
}
|
||||
|
||||
filename = gtk_icon_info_get_filename (gtkicon_info);
|
||||
if (filename == NULL)
|
||||
{
|
||||
g_object_unref (gtkicon_info);
|
||||
return nautilus_icon_info_new_for_pixbuf (NULL, scale);
|
||||
}
|
||||
icon_name = gtk_icon_paintable_get_icon_name (icon_paintable);
|
||||
|
||||
lookup_key.filename = (char *) filename;
|
||||
lookup_key.icon_name = (char *) icon_name;
|
||||
lookup_key.scale = scale;
|
||||
lookup_key.size = size;
|
||||
|
||||
icon_info = g_hash_table_lookup (themed_icon_cache, &lookup_key);
|
||||
if (!icon_info)
|
||||
{
|
||||
icon_info = nautilus_icon_info_new_for_icon_info (gtkicon_info, scale);
|
||||
icon_info = nautilus_icon_info_new_for_icon_paintable (icon_paintable, scale);
|
||||
|
||||
key = themed_icon_key_new (filename, scale, size);
|
||||
key = themed_icon_key_new (icon_name, scale, size);
|
||||
g_hash_table_insert (themed_icon_cache, key, icon_info);
|
||||
}
|
||||
|
||||
|
@ -432,31 +431,28 @@ nautilus_icon_info_lookup (GIcon *icon,
|
|||
}
|
||||
else
|
||||
{
|
||||
g_autoptr (GdkPixbuf) pixbuf = NULL;
|
||||
|
||||
pixbuf = gtk_icon_info_load_icon (gtkicon_info, NULL);
|
||||
return nautilus_icon_info_new_for_pixbuf (pixbuf, scale);
|
||||
return nautilus_icon_info_new_for_icon_paintable (icon_paintable, scale);
|
||||
}
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
nautilus_icon_info_get_pixbuf_nodefault (NautilusIconInfo *icon)
|
||||
static GdkPaintable *
|
||||
nautilus_icon_info_get_paintable_nodefault (NautilusIconInfo *icon)
|
||||
{
|
||||
GdkPixbuf *res;
|
||||
GdkPaintable *res;
|
||||
|
||||
if (icon->pixbuf == NULL)
|
||||
if (icon->paintable == NULL)
|
||||
{
|
||||
res = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = g_object_ref (icon->pixbuf);
|
||||
res = g_object_ref (icon->paintable);
|
||||
|
||||
if (icon->sole_owner)
|
||||
{
|
||||
icon->sole_owner = FALSE;
|
||||
g_object_add_toggle_ref (G_OBJECT (res),
|
||||
pixbuf_toggle_notify,
|
||||
paintable_toggle_notify,
|
||||
icon);
|
||||
}
|
||||
}
|
||||
|
@ -464,51 +460,37 @@ nautilus_icon_info_get_pixbuf_nodefault (NautilusIconInfo *icon)
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
GdkPixbuf *
|
||||
nautilus_icon_info_get_pixbuf (NautilusIconInfo *icon)
|
||||
GdkPaintable *
|
||||
nautilus_icon_info_get_paintable (NautilusIconInfo *icon)
|
||||
{
|
||||
GdkPixbuf *res;
|
||||
GdkPaintable *res;
|
||||
|
||||
res = nautilus_icon_info_get_pixbuf_nodefault (icon);
|
||||
res = nautilus_icon_info_get_paintable_nodefault (icon);
|
||||
if (res == NULL)
|
||||
{
|
||||
res = gdk_pixbuf_new_from_resource ("/org/gnome/nautilus/text-x-preview.png",
|
||||
NULL);
|
||||
res = GDK_PAINTABLE (gdk_texture_new_from_resource ("/org/gnome/nautilus/text-x-preview.png"));
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
GdkPixbuf *
|
||||
nautilus_icon_info_get_pixbuf_at_size (NautilusIconInfo *icon,
|
||||
gsize forced_size)
|
||||
GdkTexture *
|
||||
nautilus_icon_info_get_texture (NautilusIconInfo *icon)
|
||||
{
|
||||
GdkPixbuf *pixbuf, *scaled_pixbuf;
|
||||
int w, h, s;
|
||||
double scale;
|
||||
g_autoptr (GdkPaintable) paintable = NULL;
|
||||
GdkTexture *res;
|
||||
|
||||
pixbuf = nautilus_icon_info_get_pixbuf (icon);
|
||||
|
||||
w = gdk_pixbuf_get_width (pixbuf) / icon->orig_scale;
|
||||
h = gdk_pixbuf_get_height (pixbuf) / icon->orig_scale;
|
||||
s = MAX (w, h);
|
||||
if (s == forced_size)
|
||||
paintable = nautilus_icon_info_get_paintable_nodefault (icon);
|
||||
if (GDK_IS_TEXTURE (paintable))
|
||||
{
|
||||
return pixbuf;
|
||||
res = GDK_TEXTURE (g_steal_pointer (&paintable));
|
||||
}
|
||||
else
|
||||
{
|
||||
res = gdk_texture_new_from_resource ("/org/gnome/nautilus/text-x-preview.png");
|
||||
}
|
||||
|
||||
scale = (double) forced_size / s;
|
||||
|
||||
/* Neither of these can be 0. */
|
||||
w = MAX (w * scale, 1);
|
||||
h = MAX (h * scale, 1);
|
||||
|
||||
scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
|
||||
w, h,
|
||||
GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
return scaled_pixbuf;
|
||||
return res;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
@ -23,9 +23,8 @@ NautilusIconInfo * nautilus_icon_info_lookup (GIcon
|
|||
int size,
|
||||
int scale);
|
||||
gboolean nautilus_icon_info_is_fallback (NautilusIconInfo *icon);
|
||||
GdkPixbuf * nautilus_icon_info_get_pixbuf (NautilusIconInfo *icon);
|
||||
GdkPixbuf * nautilus_icon_info_get_pixbuf_at_size (NautilusIconInfo *icon,
|
||||
gsize forced_size);
|
||||
GdkPaintable * nautilus_icon_info_get_paintable (NautilusIconInfo *icon);
|
||||
GdkTexture * nautilus_icon_info_get_texture (NautilusIconInfo *icon);
|
||||
const char * nautilus_icon_info_get_used_name (NautilusIconInfo *icon);
|
||||
|
||||
void nautilus_icon_info_clear_caches (void);
|
||||
|
|
|
@ -176,7 +176,7 @@ nautilus_list_model_get_column_type (GtkTreeModel *tree_model,
|
|||
case NAUTILUS_LIST_MODEL_LARGE_ICON_COLUMN:
|
||||
case NAUTILUS_LIST_MODEL_LARGER_ICON_COLUMN:
|
||||
{
|
||||
return GDK_TYPE_PIXBUF;
|
||||
return GDK_TYPE_TEXTURE;
|
||||
}
|
||||
|
||||
case NAUTILUS_LIST_MODEL_FILE_NAME_IS_EDITABLE_COLUMN:
|
||||
|
@ -302,7 +302,7 @@ nautilus_list_model_get_icon_scale (NautilusListModel *model)
|
|||
|
||||
if (retval == -1)
|
||||
{
|
||||
retval = gdk_monitor_get_scale_factor (gdk_display_get_monitor (gdk_display_get_default (), 0));
|
||||
retval = gdk_monitor_get_scale_factor (g_list_model_get_item (gdk_display_get_monitors (gdk_display_get_default ()), 0));
|
||||
}
|
||||
|
||||
/* FIXME: Temporary regression: HiDPI icons not supported, ignore scale. */
|
||||
|
@ -350,7 +350,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
|
|||
FileEntry *file_entry;
|
||||
NautilusFile *file;
|
||||
char *str;
|
||||
GdkPixbuf *icon, *rendered_icon;
|
||||
GdkTexture *icon;
|
||||
int icon_size, icon_scale;
|
||||
NautilusListZoomLevel zoom_level;
|
||||
NautilusFileIconFlags flags;
|
||||
|
@ -387,7 +387,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
|
|||
case NAUTILUS_LIST_MODEL_LARGE_ICON_COLUMN:
|
||||
case NAUTILUS_LIST_MODEL_LARGER_ICON_COLUMN:
|
||||
{
|
||||
g_value_init (value, GDK_TYPE_PIXBUF);
|
||||
g_value_init (value, GDK_TYPE_TEXTURE);
|
||||
|
||||
if (file != NULL)
|
||||
{
|
||||
|
@ -421,8 +421,9 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
|
|||
}
|
||||
}
|
||||
|
||||
icon = nautilus_file_get_icon_pixbuf (file, icon_size, icon_scale, flags);
|
||||
icon = nautilus_file_get_icon_texture (file, icon_size, icon_scale, flags);
|
||||
|
||||
#if 0 && NAUTILUS_CLIPBOARD_NEEDS_GTK4_REIMPLEMENTATION
|
||||
if (priv->highlight_files != NULL &&
|
||||
g_list_find_custom (priv->highlight_files,
|
||||
file, (GCompareFunc) nautilus_file_compare_location))
|
||||
|
@ -435,6 +436,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
|
|||
icon = rendered_icon;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
g_value_set_object (value, icon);
|
||||
g_object_unref (icon);
|
||||
|
|
|
@ -273,7 +273,7 @@ void
|
|||
nautilus_list_view_dnd_drag_begin (NautilusListView *list_view,
|
||||
gdouble offset_x,
|
||||
gdouble offset_y,
|
||||
const GdkEvent *event)
|
||||
GdkEvent *event)
|
||||
{
|
||||
if (list_view->details->drag_button == 0)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ void nautilus_list_view_dnd_init (NautilusListView *list_view);
|
|||
void nautilus_list_view_dnd_drag_begin (NautilusListView *list_view,
|
||||
gdouble offset_x,
|
||||
gdouble offset_y,
|
||||
const GdkEvent *event);
|
||||
GdkEvent *event);
|
||||
NautilusDragInfo *
|
||||
nautilus_list_view_dnd_get_drag_source_data (NautilusListView *list_view,
|
||||
GdkDragContext *context);
|
||||
|
|
|
@ -77,11 +77,5 @@ struct NautilusListViewDetails {
|
|||
|
||||
NautilusTagManager *tag_manager;
|
||||
GCancellable *starred_cancellable;
|
||||
|
||||
GtkGesture *tree_view_drag_gesture;
|
||||
GtkGesture *tree_view_multi_press_gesture;
|
||||
GtkEventController *motion_controller;
|
||||
GtkEventController *key_controller;
|
||||
GtkGesture *long_press_gesture;
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-view.h"
|
||||
#include "nautilus-tracker-utilities.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
struct SelectionForeachData
|
||||
{
|
||||
|
@ -230,11 +229,11 @@ activate_selected_items_alternate (NautilusListView *view,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
button_event_modifies_selection (const GdkEvent *event)
|
||||
button_event_modifies_selection (GdkEvent *event)
|
||||
{
|
||||
GdkModifierType state;
|
||||
|
||||
gdk_event_get_state (event, &state);
|
||||
state = gdk_event_get_modifier_state (event);
|
||||
|
||||
return (state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) != 0;
|
||||
}
|
||||
|
@ -279,11 +278,11 @@ on_event_controller_motion_motion (GtkEventControllerMotion *controller,
|
|||
{
|
||||
if (view->details->hover_path != NULL)
|
||||
{
|
||||
gdk_window_set_cursor (gtk_widget_get_window (widget), hand_cursor);
|
||||
gtk_widget_set_cursor (widget, hand_cursor);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_set_cursor (gtk_widget_get_window (widget), NULL);
|
||||
gtk_widget_set_cursor (widget, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -344,7 +343,7 @@ on_event_controller_motion_enter (GtkEventControllerMotion *controller,
|
|||
|
||||
if (view->details->hover_path != NULL)
|
||||
{
|
||||
gdk_window_set_cursor (gtk_widget_get_window (widget), hand_cursor);
|
||||
gtk_widget_set_cursor (widget, hand_cursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -449,11 +448,11 @@ on_star_cell_renderer_clicked (GtkTreePath *path,
|
|||
}
|
||||
|
||||
static void
|
||||
on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer callback_data)
|
||||
on_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer callback_data)
|
||||
{
|
||||
NautilusListView *view;
|
||||
GtkWidget *widget;
|
||||
|
@ -465,7 +464,7 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
|||
gint bin_x;
|
||||
gint bin_y;
|
||||
GdkEventSequence *sequence;
|
||||
const GdkEvent *event;
|
||||
GdkEvent *event;
|
||||
gboolean on_expander, show_expanders;
|
||||
gboolean is_simple_click, path_selected;
|
||||
NautilusFile *file;
|
||||
|
@ -620,7 +619,7 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
|||
g_autoptr (GtkTreePath) cursor = NULL;
|
||||
GList *selected_rows = NULL;
|
||||
|
||||
gdk_event_get_state (event, &state);
|
||||
state = gdk_event_get_modifier_state (event);
|
||||
|
||||
/* We cannot easily match the expected behavior of Shift+click, so we
|
||||
* must fall back to GtkTreeView's default event handling.
|
||||
|
@ -714,16 +713,16 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
|||
}
|
||||
|
||||
static void
|
||||
on_tree_view_multi_press_gesture_released (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer callback_data)
|
||||
on_tree_view_click_gesture_released (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer callback_data)
|
||||
{
|
||||
NautilusListView *view;
|
||||
guint button;
|
||||
GdkEventSequence *sequence;
|
||||
const GdkEvent *event;
|
||||
GdkEvent *event;
|
||||
GtkTreeView *tree_view;
|
||||
GtkTreeSelection *selection;
|
||||
gint x_in_bin;
|
||||
|
@ -771,7 +770,7 @@ on_tree_view_multi_press_gesture_released (GtkGestureMultiPress *gesture,
|
|||
return;
|
||||
}
|
||||
|
||||
gdk_event_get_state (event, &state);
|
||||
state = gdk_event_get_modifier_state (event);
|
||||
|
||||
if ((button == GDK_BUTTON_PRIMARY || button == GDK_BUTTON_MIDDLE)
|
||||
&& ((state & GDK_CONTROL_MASK) != 0 ||
|
||||
|
@ -1468,7 +1467,7 @@ popup_column_header_menu (NautilusListView *list_view,
|
|||
G_CALLBACK (column_header_menu_use_default),
|
||||
list_view);
|
||||
|
||||
gtk_widget_show_all (menu);
|
||||
gtk_widget_show (menu);
|
||||
gtk_popover_set_pointing_to (popover, &(GdkRectangle){x, y, 0, 0});
|
||||
gtk_popover_popup (popover);
|
||||
|
||||
|
@ -1956,7 +1955,7 @@ on_tree_view_drag_gesture_drag_update (GtkGestureDrag *gesture,
|
|||
{
|
||||
#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
|
||||
GdkEventSequence *sequence;
|
||||
const GdkEvent *event;
|
||||
GdkEvent *event;
|
||||
NautilusListView *list_view;
|
||||
|
||||
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
|
||||
|
@ -1990,7 +1989,6 @@ create_and_set_up_tree_view (NautilusListView *view)
|
|||
GList *l;
|
||||
gchar **default_column_order, **default_visible_columns;
|
||||
GtkWidget *content_widget;
|
||||
GtkGesture *gesture;
|
||||
GtkEventController *controller;
|
||||
|
||||
content_widget = nautilus_files_view_get_content_widget (NAUTILUS_FILES_VIEW (view));
|
||||
|
@ -2040,33 +2038,29 @@ create_and_set_up_tree_view (NautilusListView *view)
|
|||
"changed",
|
||||
G_CALLBACK (list_selection_changed_callback), view, 0);
|
||||
|
||||
gesture = gtk_gesture_drag_new (GTK_WIDGET (view->details->tree_view));
|
||||
view->details->tree_view_drag_gesture = gesture;
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_drag_new ());
|
||||
gtk_widget_add_controller (GTK_WIDGET (view->details->tree_view), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
|
||||
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), 0);
|
||||
|
||||
g_signal_connect (gesture, "drag-begin",
|
||||
g_signal_connect (controller, "drag-begin",
|
||||
G_CALLBACK (on_tree_view_drag_gesture_drag_begin), view);
|
||||
g_signal_connect (gesture, "drag-update",
|
||||
g_signal_connect (controller, "drag-update",
|
||||
G_CALLBACK (on_tree_view_drag_gesture_drag_update), view);
|
||||
|
||||
gesture = gtk_gesture_multi_press_new (GTK_WIDGET (view->details->tree_view));
|
||||
view->details->tree_view_multi_press_gesture = gesture;
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
gtk_widget_add_controller (GTK_WIDGET (view->details->tree_view), controller);
|
||||
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), 0);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
|
||||
|
||||
g_signal_connect (gesture, "pressed",
|
||||
G_CALLBACK (on_tree_view_multi_press_gesture_pressed), view);
|
||||
g_signal_connect (gesture, "released",
|
||||
G_CALLBACK (on_tree_view_multi_press_gesture_released), view);
|
||||
|
||||
controller = gtk_event_controller_motion_new (GTK_WIDGET (view->details->tree_view));
|
||||
view->details->motion_controller = controller;
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (on_tree_view_click_gesture_pressed), view);
|
||||
g_signal_connect (controller, "released",
|
||||
G_CALLBACK (on_tree_view_click_gesture_released), view);
|
||||
|
||||
controller = gtk_event_controller_motion_new ();
|
||||
gtk_widget_add_controller (GTK_WIDGET (view->details->tree_view), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
|
||||
g_signal_connect (controller, "enter",
|
||||
|
@ -2076,8 +2070,8 @@ create_and_set_up_tree_view (NautilusListView *view)
|
|||
g_signal_connect (controller, "motion",
|
||||
G_CALLBACK (on_event_controller_motion_motion), view);
|
||||
|
||||
controller = gtk_event_controller_key_new (GTK_WIDGET (view->details->tree_view));
|
||||
view->details->key_controller = controller;
|
||||
controller = gtk_event_controller_key_new ();
|
||||
gtk_widget_add_controller (GTK_WIDGET (view->details->tree_view), controller);
|
||||
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_BUBBLE);
|
||||
|
||||
|
@ -2114,16 +2108,12 @@ create_and_set_up_tree_view (NautilusListView *view)
|
|||
g_signal_connect_object (view->details->model, "get-icon-scale",
|
||||
G_CALLBACK (get_icon_scale_callback), view, 0);
|
||||
|
||||
gesture = gtk_gesture_long_press_new (GTK_WIDGET (content_widget));
|
||||
view->details->long_press_gesture = gesture;
|
||||
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), TRUE);
|
||||
g_signal_connect (gesture,
|
||||
"pressed",
|
||||
(GCallback) on_longpress_gesture_pressed_event,
|
||||
view);
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_long_press_new ());
|
||||
gtk_widget_add_controller (GTK_WIDGET (content_widget), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (controller), TRUE);
|
||||
g_signal_connect (controller, "pressed",
|
||||
(GCallback) on_longpress_gesture_pressed_event, view);
|
||||
|
||||
gtk_tree_selection_set_mode (gtk_tree_view_get_selection (view->details->tree_view), GTK_SELECTION_MULTIPLE);
|
||||
|
||||
|
@ -2191,7 +2181,7 @@ create_and_set_up_tree_view (NautilusListView *view)
|
|||
gtk_tree_view_column_pack_start (view->details->file_name_column, cell, FALSE);
|
||||
gtk_tree_view_column_set_attributes (view->details->file_name_column,
|
||||
cell,
|
||||
"pixbuf", nautilus_list_model_get_column_id_from_zoom_level (view->details->zoom_level),
|
||||
"texture", nautilus_list_model_get_column_id_from_zoom_level (view->details->zoom_level),
|
||||
NULL);
|
||||
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
|
@ -3286,7 +3276,7 @@ create_column_editor (NautilusListView *view)
|
|||
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window),
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))));
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (view))));
|
||||
|
||||
file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (view));
|
||||
name = nautilus_file_get_display_name (file);
|
||||
|
@ -3364,7 +3354,7 @@ nautilus_list_view_set_zoom_level (NautilusListView *view,
|
|||
column = nautilus_list_model_get_column_id_from_zoom_level (new_level);
|
||||
gtk_tree_view_column_set_attributes (view->details->file_name_column,
|
||||
GTK_CELL_RENDERER (view->details->pixbuf_cell),
|
||||
"pixbuf", column,
|
||||
"texture", column,
|
||||
NULL);
|
||||
set_up_pixbuf_size (view);
|
||||
}
|
||||
|
@ -3439,7 +3429,6 @@ nautilus_list_view_is_zoom_level_default (NautilusFilesView *view)
|
|||
static void
|
||||
nautilus_list_view_click_policy_changed (NautilusFilesView *directory_view)
|
||||
{
|
||||
GdkWindow *win;
|
||||
GdkDisplay *display;
|
||||
NautilusListView *view;
|
||||
GtkTreeIter iter;
|
||||
|
@ -3467,8 +3456,7 @@ nautilus_list_view_click_policy_changed (NautilusFilesView *directory_view)
|
|||
tree = view->details->tree_view;
|
||||
if (gtk_widget_get_realized (GTK_WIDGET (tree)))
|
||||
{
|
||||
win = gtk_widget_get_window (GTK_WIDGET (tree));
|
||||
gdk_window_set_cursor (win, NULL);
|
||||
gtk_widget_set_cursor (GTK_WIDGET (tree), NULL);
|
||||
|
||||
if (display != NULL)
|
||||
{
|
||||
|
@ -3482,7 +3470,7 @@ nautilus_list_view_click_policy_changed (NautilusFilesView *directory_view)
|
|||
{
|
||||
if (hand_cursor == NULL)
|
||||
{
|
||||
hand_cursor = gdk_cursor_new_from_name (display, "pointer");
|
||||
hand_cursor = gdk_cursor_new_from_name ("pointer", NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3577,11 +3565,7 @@ nautilus_list_view_dispose (GObject *object)
|
|||
default_column_order_changed_callback,
|
||||
list_view);
|
||||
|
||||
g_clear_object (&list_view->details->tree_view_drag_gesture);
|
||||
g_clear_object (&list_view->details->tree_view_multi_press_gesture);
|
||||
g_clear_object (&list_view->details->motion_controller);
|
||||
g_clear_object (&list_view->details->key_controller);
|
||||
g_clear_object (&list_view->details->long_press_gesture);
|
||||
g_clear_pointer (&list_view->details->columns_popover, gtk_widget_unparent);
|
||||
|
||||
G_OBJECT_CLASS (nautilus_list_view_parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -3615,7 +3599,7 @@ nautilus_list_view_finalize (GObject *object)
|
|||
|
||||
if (list_view->details->column_editor != NULL)
|
||||
{
|
||||
gtk_widget_destroy (list_view->details->column_editor);
|
||||
gtk_window_destroy (GTK_WINDOW (list_view->details->column_editor));
|
||||
}
|
||||
|
||||
g_regex_unref (list_view->details->regex);
|
||||
|
@ -4008,7 +3992,11 @@ nautilus_list_view_init (NautilusListView *list_view)
|
|||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (list_view)),
|
||||
"nautilus-list-view");
|
||||
|
||||
list_view->details->columns_popover = gtk_popover_new (GTK_WIDGET (list_view));
|
||||
list_view->details->columns_popover = gtk_popover_new ();
|
||||
gtk_widget_set_parent (list_view->details->columns_popover,
|
||||
GTK_WIDGET (list_view));
|
||||
g_signal_connect (list_view->details->columns_popover, "destroy", G_CALLBACK (gtk_widget_unparent), NULL);
|
||||
|
||||
list_view->details->columns_popover_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_widget_set_margin_top (list_view->details->columns_popover_box, 6);
|
||||
gtk_widget_set_margin_bottom (list_view->details->columns_popover_box, 6);
|
||||
|
|
|
@ -134,7 +134,7 @@ nautilus_location_entry_update_action (NautilusLocationEntry *entry)
|
|||
return;
|
||||
}
|
||||
|
||||
current_text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
current_text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||
location = g_file_parse_name (current_text);
|
||||
|
||||
if (g_file_equal (priv->last_location, location))
|
||||
|
@ -184,7 +184,7 @@ nautilus_location_entry_update_current_uri (NautilusLocationEntry *entry,
|
|||
g_free (priv->current_directory);
|
||||
priv->current_directory = g_strdup (uri);
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), uri);
|
||||
gtk_editable_set_text (GTK_EDITABLE (entry), uri);
|
||||
set_position_and_selection_to_end (GTK_EDITABLE (entry));
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ confirm_multiple_windows_cb (GtkDialog *dialog,
|
|||
|
||||
open_multiple = (response_id == GTK_RESPONSE_OK);
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
do_open_windows (data, open_multiple);
|
||||
gtk_drag_finish (data->context, open_multiple, FALSE, data->time);
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ drag_data_received_callback (GtkWidget *widget,
|
|||
{
|
||||
char **names;
|
||||
int name_count;
|
||||
GtkWidget *window;
|
||||
GtkRoot *window;
|
||||
char *prompt;
|
||||
char *detail;
|
||||
GtkDialog *dialog;
|
||||
|
@ -320,7 +320,7 @@ drag_data_received_callback (GtkWidget *widget,
|
|||
return;
|
||||
}
|
||||
|
||||
window = gtk_widget_get_toplevel (widget);
|
||||
window = gtk_widget_get_root (widget);
|
||||
|
||||
op_data = g_new0 (OpenWindowsOnDragData, 1);
|
||||
op_data->self = g_object_ref (self);
|
||||
|
@ -578,8 +578,6 @@ finalize (GObject *object)
|
|||
g_clear_object (&priv->completions_store);
|
||||
g_free (priv->current_directory);
|
||||
|
||||
g_clear_object (&priv->controller);
|
||||
|
||||
G_OBJECT_CLASS (nautilus_location_entry_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
@ -622,7 +620,7 @@ on_has_focus_changed (GObject *object,
|
|||
if (priv->has_special_text)
|
||||
{
|
||||
priv->setting_special_text = TRUE;
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), "");
|
||||
gtk_editable_set_text (GTK_EDITABLE (entry), "");
|
||||
priv->setting_special_text = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -665,7 +663,7 @@ nautilus_location_entry_icon_release (GtkEntry *gentry,
|
|||
|
||||
case NAUTILUS_LOCATION_ENTRY_ACTION_CLEAR:
|
||||
{
|
||||
gtk_entry_set_text (gentry, "");
|
||||
gtk_editable_set_text (GTK_EDITABLE (gentry), "");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -709,7 +707,7 @@ nautilus_location_entry_key_pressed (GtkEventControllerKey *controller,
|
|||
{
|
||||
int position;
|
||||
|
||||
position = strlen (gtk_entry_get_text (GTK_ENTRY (editable)));
|
||||
position = strlen (gtk_editable_get_text (GTK_EDITABLE (editable)));
|
||||
gtk_editable_select_region (editable, position, position);
|
||||
}
|
||||
else
|
||||
|
@ -782,7 +780,7 @@ nautilus_location_entry_activate (GtkEntry *entry)
|
|||
|
||||
loc_entry = NAUTILUS_LOCATION_ENTRY (entry);
|
||||
priv = nautilus_location_entry_get_instance_private (loc_entry);
|
||||
entry_text = gtk_entry_get_text (entry);
|
||||
entry_text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||
path = g_strdup (entry_text);
|
||||
path = g_strchug (path);
|
||||
path = g_strchomp (path);
|
||||
|
@ -795,7 +793,7 @@ nautilus_location_entry_activate (GtkEntry *entry)
|
|||
{
|
||||
/* Fix non absolute paths */
|
||||
full_path = g_build_filename (priv->current_directory, path, NULL);
|
||||
gtk_entry_set_text (entry, full_path);
|
||||
gtk_editable_set_text (GTK_EDITABLE (entry), full_path);
|
||||
g_free (full_path);
|
||||
}
|
||||
|
||||
|
@ -820,8 +818,7 @@ nautilus_location_entry_class_init (NautilusLocationEntryClass *class)
|
|||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkEntryClass *entry_class;
|
||||
GtkBindingSet *binding_set;
|
||||
|
||||
g_autoptr (GtkShortcut) shortcut = NULL;
|
||||
|
||||
gobject_class = G_OBJECT_CLASS (class);
|
||||
gobject_class->dispose = nautilus_location_entry_dispose;
|
||||
|
@ -850,8 +847,9 @@ nautilus_location_entry_class_init (NautilusLocationEntryClass *class)
|
|||
g_cclosure_marshal_generic,
|
||||
G_TYPE_NONE, 1, G_TYPE_OBJECT);
|
||||
|
||||
binding_set = gtk_binding_set_by_class (class);
|
||||
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "cancel", 0);
|
||||
shortcut = gtk_shortcut_new (gtk_keyval_trigger_new (GDK_KEY_Escape, 0),
|
||||
gtk_signal_action_new ("cancel"));
|
||||
gtk_widget_class_add_shortcut (GTK_WIDGET_CLASS (class), shortcut);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -901,14 +899,14 @@ editable_activate_callback (GtkEntry *entry,
|
|||
const char *entry_text;
|
||||
g_autofree gchar *path = NULL;
|
||||
|
||||
entry_text = gtk_entry_get_text (entry);
|
||||
entry_text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||
path = g_strdup (entry_text);
|
||||
path = g_strchug (path);
|
||||
path = g_strchomp (path);
|
||||
|
||||
if (path != NULL && *path != '\0')
|
||||
{
|
||||
gtk_entry_set_text (entry, path);
|
||||
gtk_editable_set_text (GTK_EDITABLE (entry), path);
|
||||
emit_location_changed (self);
|
||||
}
|
||||
}
|
||||
|
@ -924,6 +922,7 @@ static void
|
|||
nautilus_location_entry_init (NautilusLocationEntry *entry)
|
||||
{
|
||||
NautilusLocationEntryPrivate *priv;
|
||||
GtkEventController *controller;
|
||||
|
||||
priv = nautilus_location_entry_get_instance_private (entry);
|
||||
|
||||
|
@ -964,15 +963,15 @@ nautilus_location_entry_init (NautilusLocationEntry *entry)
|
|||
g_signal_connect_object (entry, "changed",
|
||||
G_CALLBACK (editable_changed_callback), entry, 0);
|
||||
|
||||
priv->controller = gtk_event_controller_key_new (GTK_WIDGET (entry));
|
||||
controller = gtk_event_controller_key_new ();
|
||||
gtk_widget_add_controller (GTK_WIDGET (entry), controller);
|
||||
/* In GTK3, the Tab key binding (for focus change) happens in the bubble
|
||||
* phase, and we want to stop that from happening. After porting to GTK4
|
||||
* we need to check whether this is still correct. */
|
||||
gtk_event_controller_set_propagation_phase (priv->controller, GTK_PHASE_BUBBLE);
|
||||
g_signal_connect (priv->controller,
|
||||
"key-pressed",
|
||||
G_CALLBACK (nautilus_location_entry_key_pressed),
|
||||
NULL);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_BUBBLE);
|
||||
g_signal_connect (controller, "key-pressed",
|
||||
G_CALLBACK (nautilus_location_entry_key_pressed), NULL);
|
||||
|
||||
g_signal_connect_after (entry,
|
||||
"insert-text",
|
||||
G_CALLBACK (on_after_insert_text),
|
||||
|
@ -1026,6 +1025,6 @@ nautilus_location_entry_set_special_text (NautilusLocationEntry *entry,
|
|||
priv->special_text = g_strdup (special_text);
|
||||
|
||||
priv->setting_special_text = TRUE;
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), special_text);
|
||||
gtk_editable_set_text (GTK_EDITABLE (entry), special_text);
|
||||
priv->setting_special_text = FALSE;
|
||||
}
|
||||
|
|
|
@ -563,7 +563,7 @@ trash_symbolic_link_cb (GtkDialog *dialog,
|
|||
GList file_as_list;
|
||||
|
||||
data = user_data;
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
|
||||
if (response_id == GTK_RESPONSE_YES)
|
||||
{
|
||||
|
@ -1023,7 +1023,7 @@ on_confirm_multiple_windows_response (GtkDialog *dialog,
|
|||
int response_id,
|
||||
ActivateParameters *parameters)
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
|
||||
if (response_id == GTK_RESPONSE_YES)
|
||||
{
|
||||
|
@ -1109,7 +1109,7 @@ open_with_response_cb (GtkDialog *dialog,
|
|||
|
||||
if (response_id != GTK_RESPONSE_OK)
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ open_with_response_cb (GtkDialog *dialog,
|
|||
file = g_object_get_data (G_OBJECT (dialog), "mime-action:file");
|
||||
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (dialog));
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
|
||||
g_signal_emit_by_name (nautilus_signaller_get_current (), "mime-data-changed");
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ choose_program (GtkDialog *message_dialog,
|
|||
|
||||
if (response != GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (message_dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (message_dialog));
|
||||
activate_parameters_install_free (parameters);
|
||||
return;
|
||||
}
|
||||
|
@ -1156,7 +1156,7 @@ choose_program (GtkDialog *message_dialog,
|
|||
nautilus_file_ref (file);
|
||||
|
||||
/* Destroy the message dialog after ref:ing the file */
|
||||
gtk_widget_destroy (GTK_WIDGET (message_dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (message_dialog));
|
||||
|
||||
dialog = gtk_app_chooser_dialog_new (parameters->parent_window,
|
||||
GTK_DIALOG_MODAL,
|
||||
|
@ -1280,7 +1280,7 @@ search_for_application_mime_type (ActivateParametersInstall *parameters_install,
|
|||
|
||||
g_assert (parameters_install->proxy != NULL);
|
||||
|
||||
desktop_startup_id = g_strdup_printf ("_TIME%i", gtk_get_current_event_time ());
|
||||
desktop_startup_id = g_strdup_printf ("_TIME%i", (guint32) GDK_CURRENT_TIME);
|
||||
|
||||
g_dbus_proxy_call (parameters_install->proxy,
|
||||
"InstallMimeTypes",
|
||||
|
@ -1306,7 +1306,7 @@ application_unhandled_file_install (GtkDialog *dialog,
|
|||
{
|
||||
char *mime_type;
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
parameters_install->dialog = NULL;
|
||||
|
||||
if (response_id == GTK_RESPONSE_YES)
|
||||
|
@ -1377,7 +1377,7 @@ pk_proxy_appeared_cb (GObject *source,
|
|||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (application_unhandled_file_install),
|
||||
parameters_install);
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
g_free (mime_type);
|
||||
}
|
||||
|
||||
|
|
|
@ -139,14 +139,14 @@ nautilus_new_folder_dialog_controller_new (GtkWindow *parent_window,
|
|||
|
||||
if (initial_name != NULL)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (name_entry), initial_name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (name_entry), initial_name);
|
||||
}
|
||||
|
||||
gtk_button_set_label (GTK_BUTTON (activate_button), _("Create"));
|
||||
gtk_label_set_text (GTK_LABEL (name_label), _("Folder name"));
|
||||
gtk_window_set_title (GTK_WINDOW (new_folder_dialog), _("New Folder"));
|
||||
|
||||
gtk_widget_show_all (new_folder_dialog);
|
||||
gtk_widget_show (new_folder_dialog);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ nautilus_new_folder_dialog_controller_finalize (GObject *object)
|
|||
if (self->new_folder_dialog != NULL)
|
||||
{
|
||||
g_clear_signal_handler (&self->response_handler_id, self->new_folder_dialog);
|
||||
gtk_widget_destroy (self->new_folder_dialog);
|
||||
gtk_window_destroy (GTK_WINDOW (self->new_folder_dialog));
|
||||
self->new_folder_dialog = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "nautilus-window.h"
|
||||
#include "nautilus-window-slot.h"
|
||||
#include "nautilus-window-slot-dnd.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
#include <eel/eel-vfs-extensions.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
@ -169,7 +168,7 @@ nautilus_notebook_sync_loading (GtkNotebook *notebook,
|
|||
g_return_if_fail (spinner != NULL && icon != NULL);
|
||||
|
||||
active = FALSE;
|
||||
g_object_get (spinner, "active", &active, NULL);
|
||||
g_object_get (spinner, "spinning", &active, NULL);
|
||||
allow_stop = nautilus_window_slot_get_allow_stop (slot);
|
||||
|
||||
if (active == allow_stop)
|
||||
|
@ -270,7 +269,7 @@ build_tab_label (GtkNotebook *notebook,
|
|||
gtk_widget_show (label);
|
||||
|
||||
/* Tab close button */
|
||||
close_button = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_MENU);
|
||||
close_button = gtk_button_new_from_icon_name ("window-close-symbolic");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (close_button)),
|
||||
"flat");
|
||||
/* don't allow focus on the close button */
|
||||
|
@ -315,11 +314,11 @@ nautilus_notebook_add_tab (GtkNotebook *notebook,
|
|||
tab_label,
|
||||
position);
|
||||
|
||||
gtk_container_child_set (GTK_CONTAINER (notebook),
|
||||
GTK_WIDGET (slot),
|
||||
"tab-expand", TRUE,
|
||||
"detachable", FALSE,
|
||||
NULL);
|
||||
g_object_set (gtk_notebook_get_page (GTK_NOTEBOOK (notebook),
|
||||
GTK_WIDGET (slot)),
|
||||
"tab-expand", TRUE,
|
||||
"detachable", FALSE,
|
||||
NULL);
|
||||
|
||||
nautilus_notebook_sync_tab_label (notebook, slot);
|
||||
nautilus_notebook_sync_loading (notebook, slot);
|
||||
|
|
|
@ -223,25 +223,25 @@ set_copy_move_dialog_text (FileConflictDialogData *data)
|
|||
static void
|
||||
set_images (FileConflictDialogData *data)
|
||||
{
|
||||
GdkPixbuf *source_pixbuf;
|
||||
GdkPixbuf *destination_pixbuf;
|
||||
GdkPaintable *source_paintable;
|
||||
GdkPaintable *destination_paintable;
|
||||
|
||||
destination_pixbuf = nautilus_file_get_icon_pixbuf (data->destination,
|
||||
NAUTILUS_GRID_ICON_SIZE_SMALL,
|
||||
1,
|
||||
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
|
||||
destination_paintable = nautilus_file_get_icon_paintable (data->destination,
|
||||
NAUTILUS_GRID_ICON_SIZE_SMALL,
|
||||
1,
|
||||
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
|
||||
|
||||
source_pixbuf = nautilus_file_get_icon_pixbuf (data->source,
|
||||
NAUTILUS_GRID_ICON_SIZE_SMALL,
|
||||
1,
|
||||
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
|
||||
source_paintable = nautilus_file_get_icon_paintable (data->source,
|
||||
NAUTILUS_GRID_ICON_SIZE_SMALL,
|
||||
1,
|
||||
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
|
||||
|
||||
nautilus_file_conflict_dialog_set_images (data->dialog,
|
||||
destination_pixbuf,
|
||||
source_pixbuf);
|
||||
destination_paintable,
|
||||
source_paintable);
|
||||
|
||||
g_object_unref (destination_pixbuf);
|
||||
g_object_unref (source_pixbuf);
|
||||
g_object_unref (destination_paintable);
|
||||
g_object_unref (source_paintable);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -463,7 +463,7 @@ on_conflict_dialog_response (GtkDialog *dialog,
|
|||
|
||||
data->response->id = response_id;
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (data->dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (data->dialog));
|
||||
|
||||
nautilus_file_unref (data->source);
|
||||
nautilus_file_unref (data->destination);
|
||||
|
@ -561,7 +561,7 @@ on_app_chooser_response (GtkDialog *dialog,
|
|||
application = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (dialog));
|
||||
}
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
|
||||
if (application != NULL)
|
||||
{
|
||||
|
@ -638,10 +638,10 @@ on_request_passphrase_cb (GtkDialog *dialog,
|
|||
if (response_id != GTK_RESPONSE_CANCEL &&
|
||||
response_id != GTK_RESPONSE_DELETE_EVENT)
|
||||
{
|
||||
data->passphrase = g_strdup (gtk_entry_get_text (data->passphrase_entry));
|
||||
data->passphrase = g_strdup (gtk_editable_get_text (GTK_EDITABLE (data->passphrase_entry)));
|
||||
}
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
invoke_main_context_completed (data);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "nautilus-icon-names.h"
|
||||
#include "nautilus-trash-monitor.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
#include "nautilus-window-slot-dnd.h"
|
||||
|
||||
|
@ -78,8 +77,6 @@ typedef struct
|
|||
|
||||
NautilusPathBar *path_bar;
|
||||
|
||||
GtkGesture *multi_press_gesture;
|
||||
|
||||
guint ignore_changes : 1;
|
||||
guint is_root : 1;
|
||||
} ButtonData;
|
||||
|
@ -99,7 +96,7 @@ struct _NautilusPathBar
|
|||
GActionGroup *action_group;
|
||||
|
||||
NautilusFile *context_menu_file;
|
||||
GtkPopover *current_view_menu_popover;
|
||||
GtkPopoverMenu *current_view_menu_popover;
|
||||
GtkWidget *current_view_menu_button;
|
||||
GtkWidget *button_menu_popover;
|
||||
GMenu *current_view_menu;
|
||||
|
@ -214,9 +211,8 @@ on_adjustment_changed (GtkAdjustment *adjustment)
|
|||
static gboolean
|
||||
bind_current_view_menu_model_to_popover (NautilusPathBar *self)
|
||||
{
|
||||
gtk_popover_bind_model (self->current_view_menu_popover,
|
||||
G_MENU_MODEL (self->current_view_menu),
|
||||
NULL);
|
||||
gtk_popover_menu_set_menu_model (self->current_view_menu_popover,
|
||||
G_MENU_MODEL (self->current_view_menu));
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
|
@ -227,7 +223,7 @@ nautilus_path_bar_init (NautilusPathBar *self)
|
|||
GtkBuilder *builder;
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
self->scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
self->scrolled = gtk_scrolled_window_new ();
|
||||
/* Scroll horizontally only and don't use internal scrollbar. */
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (self->scrolled),
|
||||
/* hscrollbar-policy */ GTK_POLICY_EXTERNAL,
|
||||
|
@ -243,8 +239,7 @@ nautilus_path_bar_init (NautilusPathBar *self)
|
|||
|
||||
self->current_view_menu_button = gtk_menu_button_new ();
|
||||
gtk_menu_button_set_child (GTK_MENU_BUTTON (self->current_view_menu_button),
|
||||
gtk_image_new_from_icon_name ("view-more-symbolic",
|
||||
GTK_ICON_SIZE_MENU));
|
||||
gtk_image_new_from_icon_name ("view-more-symbolic"));
|
||||
gtk_box_append (GTK_BOX (self), self->current_view_menu_button);
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
|
@ -258,8 +253,8 @@ nautilus_path_bar_init (NautilusPathBar *self)
|
|||
g_error ("Failed to add pathbar-context-menu.ui: %s", error->message);
|
||||
}
|
||||
self->button_menu = g_object_ref_sink (G_MENU (gtk_builder_get_object (builder, "button-menu")));
|
||||
self->button_menu_popover = g_object_ref_sink (gtk_popover_new_from_model (NULL,
|
||||
G_MENU_MODEL (self->button_menu)));
|
||||
self->button_menu_popover = gtk_popover_menu_new_from_model (G_MENU_MODEL (self->button_menu));
|
||||
gtk_widget_set_parent (self->button_menu_popover, GTK_WIDGET (self));
|
||||
|
||||
/* Add current location menu, which matches the view's background context menu */
|
||||
gtk_builder_add_from_resource (builder,
|
||||
|
@ -272,7 +267,7 @@ nautilus_path_bar_init (NautilusPathBar *self)
|
|||
self->current_view_menu = g_object_ref_sink (G_MENU (gtk_builder_get_object (builder, "background-menu")));
|
||||
self->extensions_section = g_object_ref (G_MENU (gtk_builder_get_object (builder, "background-extensions-section")));
|
||||
self->templates_submenu = g_object_ref (G_MENU (gtk_builder_get_object (builder, "templates-submenu")));
|
||||
self->current_view_menu_popover = g_object_ref_sink (GTK_POPOVER (gtk_popover_new (NULL)));
|
||||
self->current_view_menu_popover = g_object_ref_sink (GTK_POPOVER_MENU (gtk_popover_menu_new_from_model (NULL)));
|
||||
|
||||
g_object_unref (builder);
|
||||
|
||||
|
@ -310,7 +305,7 @@ nautilus_path_bar_finalize (GObject *object)
|
|||
g_clear_object (&self->extensions_section);
|
||||
g_clear_object (&self->templates_submenu);
|
||||
g_clear_object (&self->button_menu);
|
||||
g_clear_object (&self->button_menu_popover);
|
||||
g_clear_pointer (&self->button_menu_popover, gtk_widget_unparent);
|
||||
g_clear_object (&self->current_view_menu_popover);
|
||||
|
||||
unschedule_pop_up_context_menu (NAUTILUS_PATH_BAR (object));
|
||||
|
@ -378,8 +373,6 @@ button_data_free (ButtonData *button_data)
|
|||
nautilus_file_unref (button_data->file);
|
||||
}
|
||||
|
||||
g_clear_object (&button_data->multi_press_gesture);
|
||||
|
||||
g_free (button_data);
|
||||
}
|
||||
|
||||
|
@ -425,7 +418,7 @@ nautilus_path_bar_set_templates_menu (NautilusPathBar *self,
|
|||
* templates menu is set. Unbinding the model is the only way to clear
|
||||
* all children. After that's done, on idle, we rebind it.
|
||||
* See https://gitlab.gnome.org/GNOME/nautilus/-/issues/1705 */
|
||||
gtk_popover_bind_model (self->current_view_menu_popover, NULL, NULL);
|
||||
gtk_popover_menu_set_menu_model (self->current_view_menu_popover, NULL);
|
||||
}
|
||||
|
||||
nautilus_gmenu_set_from_model (self->templates_submenu, menu);
|
||||
|
@ -560,11 +553,11 @@ pop_up_pathbar_context_menu (NautilusPathBar *self,
|
|||
|
||||
|
||||
static void
|
||||
on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
on_click_gesture_pressed (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
{
|
||||
ButtonData *button_data;
|
||||
NautilusPathBar *self;
|
||||
|
@ -579,7 +572,7 @@ on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
|||
button_data = BUTTON_DATA (user_data);
|
||||
self = button_data->path_bar;
|
||||
current_button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
||||
gtk_get_current_event_state (&state);
|
||||
state = gtk_event_controller_get_current_event_state (GTK_EVENT_CONTROLLER (gesture));
|
||||
|
||||
switch (current_button)
|
||||
{
|
||||
|
@ -602,8 +595,15 @@ on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
|||
}
|
||||
else
|
||||
{
|
||||
gtk_popover_set_relative_to (GTK_POPOVER (self->button_menu_popover),
|
||||
button_data->button);
|
||||
/* Hold a reference to keep the popover from destroying itself
|
||||
* when unparented. */
|
||||
g_object_ref (self->button_menu_popover);
|
||||
gtk_widget_unparent (self->button_menu_popover);
|
||||
gtk_widget_set_parent (self->button_menu_popover,
|
||||
button_data->button);
|
||||
gtk_popover_present (GTK_POPOVER (self->button_menu_popover));
|
||||
g_object_unref (self->button_menu_popover);
|
||||
|
||||
pop_up_pathbar_context_menu (self, button_data->file);
|
||||
}
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ nautilus_path_bar_update_button_appearance (ButtonData *button_data,
|
|||
icon = get_gicon (button_data);
|
||||
if (icon != NULL)
|
||||
{
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (button_data->image), icon, GTK_ICON_SIZE_MENU);
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (button_data->image), icon);
|
||||
gtk_widget_show (GTK_WIDGET (button_data->image));
|
||||
g_object_unref (icon);
|
||||
}
|
||||
|
@ -976,6 +976,7 @@ make_button_data (NautilusPathBar *self,
|
|||
{
|
||||
GFile *path;
|
||||
GtkWidget *child = NULL;
|
||||
GtkEventController *controller;
|
||||
ButtonData *button_data;
|
||||
|
||||
path = nautilus_file_get_location (file);
|
||||
|
@ -1077,7 +1078,7 @@ make_button_data (NautilusPathBar *self,
|
|||
}
|
||||
|
||||
gtk_button_set_child (GTK_BUTTON (button_data->button), child);
|
||||
gtk_widget_show_all (button_data->container);
|
||||
gtk_widget_show (button_data->container);
|
||||
|
||||
nautilus_path_bar_update_button_state (button_data, current_dir);
|
||||
|
||||
|
@ -1088,12 +1089,11 @@ make_button_data (NautilusPathBar *self,
|
|||
/* A gesture is needed here, because GtkButton doesn’t react to middle- or
|
||||
* secondary-clicking.
|
||||
*/
|
||||
button_data->multi_press_gesture = gtk_gesture_multi_press_new (button_data->button);
|
||||
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (button_data->multi_press_gesture), 0);
|
||||
|
||||
g_signal_connect (button_data->multi_press_gesture, "pressed",
|
||||
G_CALLBACK (on_multi_press_gesture_pressed), button_data);
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
gtk_widget_add_controller (button_data->button, controller);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (on_click_gesture_pressed), button_data);
|
||||
|
||||
#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
|
||||
nautilus_drag_slot_proxy_init (button_data->button, button_data->file, NULL);
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "nautilus-toolbar-menu-sections.h"
|
||||
#include "nautilus-view.h"
|
||||
#include "nautilus-window-slot.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -72,20 +71,20 @@ open_location_cb (NautilusPlacesView *view,
|
|||
|
||||
switch (open_flags)
|
||||
{
|
||||
case GTK_PLACES_OPEN_NEW_TAB:
|
||||
case NAUTILUS_OPEN_FLAG_NEW_TAB:
|
||||
{
|
||||
flags = NAUTILUS_OPEN_FLAG_NEW_TAB |
|
||||
NAUTILUS_OPEN_FLAG_DONT_MAKE_ACTIVE;
|
||||
}
|
||||
break;
|
||||
|
||||
case GTK_PLACES_OPEN_NEW_WINDOW:
|
||||
case NAUTILUS_OPEN_FLAG_NEW_WINDOW:
|
||||
{
|
||||
flags = NAUTILUS_OPEN_FLAG_NEW_WINDOW;
|
||||
}
|
||||
break;
|
||||
|
||||
case GTK_PLACES_OPEN_NORMAL: /* fall-through */
|
||||
case NAUTILUS_OPEN_FLAG_NORMAL: /* fall-through */
|
||||
default:
|
||||
{
|
||||
flags = 0;
|
||||
|
@ -96,12 +95,12 @@ open_location_cb (NautilusPlacesView *view,
|
|||
if (slot)
|
||||
{
|
||||
NautilusFile *file;
|
||||
GtkWidget *window;
|
||||
GtkRoot *window;
|
||||
char *path;
|
||||
|
||||
path = "other-locations:///";
|
||||
file = nautilus_file_get (location);
|
||||
window = gtk_widget_get_toplevel (GTK_WIDGET (view));
|
||||
window = gtk_widget_get_root (GTK_WIDGET (view));
|
||||
|
||||
nautilus_mime_activate_file (GTK_WINDOW (window),
|
||||
NAUTILUS_WINDOW_SLOT (slot),
|
||||
|
@ -124,9 +123,9 @@ show_error_message_cb (NautilusGtkPlacesView *view,
|
|||
const gchar *secondary)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *window;
|
||||
GtkRoot *window;
|
||||
|
||||
window = gtk_widget_get_toplevel (GTK_WIDGET (view));
|
||||
window = gtk_widget_get_root (GTK_WIDGET (view));
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
|
||||
|
@ -136,8 +135,8 @@ show_error_message_cb (NautilusGtkPlacesView *view,
|
|||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
"%s", secondary);
|
||||
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
gtk_widget_show_all (dialog);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -386,7 +385,7 @@ nautilus_places_view_init (NautilusPlacesView *self)
|
|||
/* Places view */
|
||||
priv->places_view = nautilus_gtk_places_view_new ();
|
||||
nautilus_gtk_places_view_set_open_flags (NAUTILUS_GTK_PLACES_VIEW (priv->places_view),
|
||||
GTK_PLACES_OPEN_NEW_TAB | GTK_PLACES_OPEN_NEW_WINDOW | GTK_PLACES_OPEN_NORMAL);
|
||||
NAUTILUS_OPEN_FLAG_NEW_TAB | NAUTILUS_OPEN_FLAG_NEW_WINDOW | NAUTILUS_OPEN_FLAG_NORMAL);
|
||||
gtk_widget_set_hexpand (priv->places_view, TRUE);
|
||||
gtk_widget_set_vexpand (priv->places_view, TRUE);
|
||||
gtk_widget_show (priv->places_view);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gio/gio.h>
|
||||
#include <libhandy-1/handy.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
|
@ -74,7 +74,7 @@ static GtkWidget *preferences_window = NULL;
|
|||
static void list_store_append_string (GListStore *list_store,
|
||||
const gchar *string)
|
||||
{
|
||||
g_autoptr (HdyValueObject) obj = hdy_value_object_new_string (string);
|
||||
g_autoptr (GtkStringObject) obj = gtk_string_object_new (string);
|
||||
g_list_store_append (list_store, obj);
|
||||
}
|
||||
|
||||
|
@ -84,10 +84,10 @@ static void free_column_names_array(GPtrArray *column_names)
|
|||
g_ptr_array_free (column_names, TRUE);
|
||||
}
|
||||
|
||||
static void create_icon_caption_combo_row_items(HdyComboRow *combo_row,
|
||||
static void create_icon_caption_combo_row_items(AdwComboRow *combo_row,
|
||||
GList *columns)
|
||||
{
|
||||
GListStore *list_store = g_list_store_new (HDY_TYPE_VALUE_OBJECT);
|
||||
GListStore *list_store = g_list_store_new (GTK_TYPE_STRING_OBJECT);
|
||||
GList *l;
|
||||
GPtrArray *column_names;
|
||||
|
||||
|
@ -120,14 +120,12 @@ static void create_icon_caption_combo_row_items(HdyComboRow *combo_row,
|
|||
|
||||
g_free (label);
|
||||
}
|
||||
hdy_combo_row_bind_name_model (combo_row, G_LIST_MODEL (list_store),
|
||||
(HdyComboRowGetNameFunc) hdy_value_object_dup_string,
|
||||
NULL, NULL);
|
||||
adw_combo_row_set_model (combo_row, G_LIST_MODEL (list_store));
|
||||
g_object_set_data_full (G_OBJECT (combo_row), "column_names", column_names,
|
||||
(GDestroyNotify) free_column_names_array);
|
||||
}
|
||||
|
||||
static void icon_captions_changed_callback(HdyComboRow *widget,
|
||||
static void icon_captions_changed_callback(AdwComboRow *widget,
|
||||
GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
{
|
||||
|
@ -148,7 +146,7 @@ static void icon_captions_changed_callback(HdyComboRow *widget,
|
|||
|
||||
combo_row = GTK_WIDGET (
|
||||
gtk_builder_get_object (builder, icon_captions_components[i]));
|
||||
selected_index = hdy_combo_row_get_selected_index (HDY_COMBO_ROW (combo_row));
|
||||
selected_index = adw_combo_row_get_selected (ADW_COMBO_ROW (combo_row));
|
||||
|
||||
column_names = g_object_get_data (G_OBJECT (combo_row), "column_names");
|
||||
|
||||
|
@ -182,7 +180,7 @@ static void update_caption_combo_row(GtkBuilder *builder,
|
|||
{
|
||||
if (!strcmp (name, g_ptr_array_index (column_names, i)))
|
||||
{
|
||||
hdy_combo_row_set_selected_index (HDY_COMBO_ROW (combo_row), i);
|
||||
adw_combo_row_set_selected (ADW_COMBO_ROW (combo_row), i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -242,11 +240,11 @@ nautilus_preferences_window_setup_icon_caption_page (GtkBuilder *builder)
|
|||
combo_row = GTK_WIDGET (
|
||||
gtk_builder_get_object (builder, icon_captions_components[i]));
|
||||
|
||||
create_icon_caption_combo_row_items (HDY_COMBO_ROW (combo_row), columns);
|
||||
create_icon_caption_combo_row_items (ADW_COMBO_ROW (combo_row), columns);
|
||||
gtk_widget_set_sensitive (combo_row, writable);
|
||||
|
||||
g_signal_connect_data (
|
||||
combo_row, "notify::selected-index", G_CALLBACK (icon_captions_changed_callback),
|
||||
combo_row, "notify::selected", G_CALLBACK (icon_captions_changed_callback),
|
||||
g_object_ref (builder), (GClosureNotify) g_object_unref, 0);
|
||||
}
|
||||
|
||||
|
@ -302,7 +300,7 @@ static void bind_builder_combo_row(GtkBuilder *builder,
|
|||
const char **values)
|
||||
{
|
||||
g_settings_bind_with_mapping (settings, prefs, gtk_builder_get_object (builder, widget_name),
|
||||
"selected-index", G_SETTINGS_BIND_DEFAULT,
|
||||
"selected", G_SETTINGS_BIND_DEFAULT,
|
||||
combo_row_mapping_get, combo_row_mapping_set,
|
||||
(gpointer) values, NULL);
|
||||
}
|
||||
|
@ -311,20 +309,20 @@ static void setup_combo (GtkBuilder *builder,
|
|||
const char *widget_name,
|
||||
const char **strings)
|
||||
{
|
||||
HdyComboRow *combo_row;
|
||||
AdwComboRow *combo_row;
|
||||
GListStore *list_store;
|
||||
|
||||
combo_row = (HdyComboRow *) gtk_builder_get_object (builder, widget_name);
|
||||
g_assert (HDY_IS_COMBO_ROW (combo_row));
|
||||
combo_row = (AdwComboRow *) gtk_builder_get_object (builder, widget_name);
|
||||
g_assert (ADW_IS_COMBO_ROW (combo_row));
|
||||
|
||||
list_store = g_list_store_new (HDY_TYPE_VALUE_OBJECT);
|
||||
list_store = g_list_store_new (GTK_TYPE_STRING_OBJECT);
|
||||
|
||||
for (gsize i = 0; strings[i]; i++)
|
||||
{
|
||||
list_store_append_string (list_store, strings[i]);
|
||||
}
|
||||
|
||||
hdy_combo_row_bind_name_model (combo_row, G_LIST_MODEL (list_store), (HdyComboRowGetNameFunc) hdy_value_object_dup_string, NULL, NULL);
|
||||
adw_combo_row_set_model (combo_row, G_LIST_MODEL (list_store));
|
||||
}
|
||||
|
||||
static void nautilus_preferences_window_setup(GtkBuilder *builder,
|
||||
|
|
|
@ -49,9 +49,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (NautilusProgressInfoWidget, nautilus_progress_info_w
|
|||
static void
|
||||
info_finished (NautilusProgressInfoWidget *self)
|
||||
{
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image),
|
||||
"object-select-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image), "object-select-symbolic");
|
||||
gtk_widget_set_sensitive (self->priv->button, FALSE);
|
||||
}
|
||||
|
||||
|
@ -127,9 +125,7 @@ nautilus_progress_info_widget_constructed (GObject *obj)
|
|||
|
||||
if (nautilus_progress_info_get_is_finished (self->priv->info))
|
||||
{
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image),
|
||||
"object-select-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image), "object-select-symbolic");
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (self->priv->button,
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "nautilus-signaller.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-signaller.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
static GHashTable *windows;
|
||||
static GHashTable *pending_lists;
|
||||
|
@ -72,7 +71,7 @@ typedef struct
|
|||
|
||||
struct _NautilusPropertiesWindow
|
||||
{
|
||||
HdyWindow parent_instance;
|
||||
AdwWindow parent_instance;
|
||||
|
||||
GList *original_files;
|
||||
GList *target_files;
|
||||
|
@ -288,7 +287,7 @@ static void schedule_directory_contents_update (NautilusPropertiesWindow *self);
|
|||
static void directory_contents_value_field_update (NautilusPropertiesWindow *self);
|
||||
static void file_changed_callback (NautilusFile *file,
|
||||
gpointer user_data);
|
||||
static void permission_button_update (GtkToggleButton *button,
|
||||
static void permission_button_update (GtkCheckButton *button,
|
||||
NautilusPropertiesWindow *self);
|
||||
static void permission_combo_update (GtkComboBox *combo,
|
||||
NautilusPropertiesWindow *self);
|
||||
|
@ -316,7 +315,7 @@ static void name_field_activate (GtkWidget *name_field,
|
|||
gpointer user_data);
|
||||
static void setup_pie_widget (NautilusPropertiesWindow *self);
|
||||
|
||||
G_DEFINE_TYPE (NautilusPropertiesWindow, nautilus_properties_window, HDY_TYPE_WINDOW);
|
||||
G_DEFINE_TYPE (NautilusPropertiesWindow, nautilus_properties_window, ADW_TYPE_WINDOW);
|
||||
|
||||
static gboolean
|
||||
is_multi_file_window (NautilusPropertiesWindow *self)
|
||||
|
@ -396,7 +395,7 @@ get_target_file (NautilusPropertiesWindow *self)
|
|||
static void
|
||||
get_image_for_properties_window (NautilusPropertiesWindow *self,
|
||||
char **icon_name,
|
||||
GdkPixbuf **icon_pixbuf)
|
||||
GdkPaintable **icon_paintable)
|
||||
{
|
||||
g_autoptr (NautilusIconInfo) icon = NULL;
|
||||
GList *l;
|
||||
|
@ -445,9 +444,9 @@ get_image_for_properties_window (NautilusPropertiesWindow *self,
|
|||
*icon_name = g_strdup (nautilus_icon_info_get_used_name (icon));
|
||||
}
|
||||
|
||||
if (icon_pixbuf != NULL)
|
||||
if (icon_paintable != NULL)
|
||||
{
|
||||
*icon_pixbuf = nautilus_icon_info_get_pixbuf_at_size (icon, NAUTILUS_GRID_ICON_SIZE_STANDARD);
|
||||
*icon_paintable = nautilus_icon_info_get_paintable (icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -455,18 +454,18 @@ get_image_for_properties_window (NautilusPropertiesWindow *self,
|
|||
static void
|
||||
update_properties_window_icon (NautilusPropertiesWindow *self)
|
||||
{
|
||||
g_autoptr (GdkPixbuf) pixbuf = NULL;
|
||||
g_autoptr (GdkPaintable) paintable = NULL;
|
||||
g_autofree char *name = NULL;
|
||||
|
||||
get_image_for_properties_window (self, &name, &pixbuf);
|
||||
get_image_for_properties_window (self, &name, &paintable);
|
||||
|
||||
if (name != NULL)
|
||||
{
|
||||
gtk_window_set_icon_name (GTK_WINDOW (self), name);
|
||||
}
|
||||
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (self->icon_image), pixbuf);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (self->icon_button_image), pixbuf);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (self->icon_image), paintable);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (self->icon_button_image), paintable);
|
||||
}
|
||||
|
||||
#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION
|
||||
|
@ -527,7 +526,7 @@ nautilus_properties_window_drag_data_received (GtkWidget *widget,
|
|||
GtkWindow *window;
|
||||
|
||||
image = GTK_IMAGE (widget);
|
||||
window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (image)));
|
||||
window = GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (image)));
|
||||
|
||||
uris = g_strsplit ((const gchar *) gtk_selection_data_get_data (selection_data), "\r\n", 0);
|
||||
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
|
||||
|
@ -634,7 +633,7 @@ set_name_field (NautilusPropertiesWindow *self,
|
|||
g_autofree gchar *displayed_name = gtk_editable_get_chars (GTK_EDITABLE (self->name_field), 0, -1);
|
||||
if (strcmp (displayed_name, name) != 0)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (self->name_field), name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (self->name_field), name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -743,7 +742,7 @@ name_field_restore_original_name (GtkWidget *name_field)
|
|||
|
||||
if (strcmp (original_name, displayed_name) != 0)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (name_field), original_name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (name_field), original_name);
|
||||
}
|
||||
gtk_editable_select_region (GTK_EDITABLE (name_field), 0, -1);
|
||||
}
|
||||
|
@ -1186,7 +1185,7 @@ update_files_callback (gpointer data)
|
|||
if (self->original_files == NULL)
|
||||
{
|
||||
/* Close the window if no files are left */
|
||||
gtk_widget_destroy (GTK_WIDGET (self));
|
||||
gtk_window_destroy (GTK_WINDOW (self));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2401,10 +2400,13 @@ should_show_volume_usage (NautilusPropertiesWindow *self)
|
|||
}
|
||||
|
||||
static void
|
||||
paint_legend (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
paint_legend (GtkDrawingArea *drawing_area,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (drawing_area);
|
||||
GtkStyleContext *context;
|
||||
GtkAllocation allocation;
|
||||
|
||||
|
@ -2428,7 +2430,6 @@ paint_slice (GtkWidget *widget,
|
|||
double offset = G_PI / 2.0;
|
||||
GdkRGBA fill;
|
||||
GdkRGBA stroke;
|
||||
GtkStateFlags state;
|
||||
GtkBorder border;
|
||||
GtkStyleContext *context;
|
||||
double x, y, radius;
|
||||
|
@ -2440,14 +2441,13 @@ paint_slice (GtkWidget *widget,
|
|||
}
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
state = gtk_style_context_get_state (context);
|
||||
gtk_style_context_get_border (context, state, &border);
|
||||
gtk_style_context_get_border (context, &border);
|
||||
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_add_class (context, style_class);
|
||||
gtk_style_context_get_color (context, state, &fill);
|
||||
gtk_style_context_get_color (context, &fill);
|
||||
gtk_style_context_add_class (context, "border");
|
||||
gtk_style_context_get_color (context, state, &stroke);
|
||||
gtk_style_context_get_color (context, &stroke);
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
|
@ -2489,11 +2489,14 @@ paint_slice (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
paint_pie_chart (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
paint_pie_chart (GtkDrawingArea *drawing_area,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data)
|
||||
{
|
||||
NautilusPropertiesWindow *self;
|
||||
GtkWidget *widget = GTK_WIDGET (drawing_area);
|
||||
double free, used, reserved;
|
||||
|
||||
self = NAUTILUS_PROPERTIES_WINDOW (data);
|
||||
|
@ -2553,12 +2556,12 @@ setup_pie_widget (NautilusPropertiesWindow *self)
|
|||
}
|
||||
}
|
||||
|
||||
g_signal_connect (self->pie_chart, "draw",
|
||||
G_CALLBACK (paint_pie_chart), self);
|
||||
g_signal_connect (self->used_color, "draw",
|
||||
G_CALLBACK (paint_legend), self);
|
||||
g_signal_connect (self->free_color, "draw",
|
||||
G_CALLBACK (paint_legend), self);
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (self->pie_chart),
|
||||
paint_pie_chart, self, NULL);
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (self->used_color),
|
||||
paint_legend, self, NULL);
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (self->free_color),
|
||||
paint_legend, self, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2872,12 +2875,7 @@ start_long_operation (NautilusPropertiesWindow *self)
|
|||
if (self->long_operation_underway == 0)
|
||||
{
|
||||
/* start long operation */
|
||||
GdkDisplay *display;
|
||||
g_autoptr (GdkCursor) cursor = NULL;
|
||||
|
||||
display = gtk_widget_get_display (GTK_WIDGET (self));
|
||||
cursor = gdk_cursor_new_from_name (display, "wait");
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (self)), cursor);
|
||||
gtk_widget_set_cursor_from_name (GTK_WIDGET (self), "wait");
|
||||
}
|
||||
self->long_operation_underway++;
|
||||
}
|
||||
|
@ -2885,11 +2883,11 @@ start_long_operation (NautilusPropertiesWindow *self)
|
|||
static void
|
||||
end_long_operation (NautilusPropertiesWindow *self)
|
||||
{
|
||||
if (gtk_widget_get_window (GTK_WIDGET (self)) != NULL &&
|
||||
if (gtk_native_get_surface (GTK_NATIVE (self)) != NULL &&
|
||||
self->long_operation_underway == 1)
|
||||
{
|
||||
/* finished !! */
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (self)), NULL);
|
||||
gtk_widget_set_cursor (GTK_WIDGET (self), NULL);
|
||||
}
|
||||
self->long_operation_underway--;
|
||||
}
|
||||
|
@ -3013,7 +3011,7 @@ initial_permission_state_consistent (NautilusPropertiesWindow *self,
|
|||
}
|
||||
|
||||
static void
|
||||
permission_button_toggled (GtkToggleButton *button,
|
||||
permission_button_toggled (GtkCheckButton *button,
|
||||
NautilusPropertiesWindow *self)
|
||||
{
|
||||
gboolean is_folder, is_special;
|
||||
|
@ -3028,8 +3026,8 @@ permission_button_toggled (GtkToggleButton *button,
|
|||
is_special = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button),
|
||||
"is-special"));
|
||||
|
||||
if (gtk_toggle_button_get_active (button)
|
||||
&& !gtk_toggle_button_get_inconsistent (button))
|
||||
if (gtk_check_button_get_active (button)
|
||||
&& !gtk_check_button_get_inconsistent (button))
|
||||
{
|
||||
/* Go to the initial state unless the initial state was
|
||||
* consistent, or we support recursive apply */
|
||||
|
@ -3042,8 +3040,8 @@ permission_button_toggled (GtkToggleButton *button,
|
|||
on = TRUE;
|
||||
}
|
||||
}
|
||||
else if (gtk_toggle_button_get_inconsistent (button)
|
||||
&& !gtk_toggle_button_get_active (button))
|
||||
else if (gtk_check_button_get_inconsistent (button)
|
||||
&& !gtk_check_button_get_active (button))
|
||||
{
|
||||
inconsistent = FALSE;
|
||||
on = TRUE;
|
||||
|
@ -3058,8 +3056,8 @@ permission_button_toggled (GtkToggleButton *button,
|
|||
G_CALLBACK (permission_button_toggled),
|
||||
self);
|
||||
|
||||
gtk_toggle_button_set_active (button, on);
|
||||
gtk_toggle_button_set_inconsistent (button, inconsistent);
|
||||
gtk_check_button_set_active (button, on);
|
||||
gtk_check_button_set_inconsistent (button, inconsistent);
|
||||
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (button),
|
||||
G_CALLBACK (permission_button_toggled),
|
||||
|
@ -3074,7 +3072,7 @@ permission_button_toggled (GtkToggleButton *button,
|
|||
}
|
||||
|
||||
static void
|
||||
permission_button_update (GtkToggleButton *button,
|
||||
permission_button_update (GtkCheckButton *button,
|
||||
NautilusPropertiesWindow *self)
|
||||
{
|
||||
GList *l;
|
||||
|
@ -3146,12 +3144,12 @@ permission_button_update (GtkToggleButton *button,
|
|||
G_CALLBACK (permission_button_toggled),
|
||||
self);
|
||||
|
||||
gtk_toggle_button_set_active (button, !all_unset);
|
||||
gtk_check_button_set_active (button, !all_unset);
|
||||
/* if actually inconsistent, or default value for file buttons
|
||||
* if no files are selected. (useful for recursive apply) */
|
||||
gtk_toggle_button_set_inconsistent (button,
|
||||
(!all_unset && !all_set) ||
|
||||
(!is_folder && no_match));
|
||||
gtk_check_button_set_inconsistent (button,
|
||||
(!all_unset && !all_set) ||
|
||||
(!is_folder && no_match));
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (button), sensitive);
|
||||
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (button),
|
||||
|
@ -3900,7 +3898,7 @@ on_change_permissions_response (GtkDialog *dialog,
|
|||
if (response != GTK_RESPONSE_OK)
|
||||
{
|
||||
g_clear_pointer (&self->change_permission_combos, g_list_free);
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3978,7 +3976,7 @@ on_change_permissions_response (GtkDialog *dialog,
|
|||
}
|
||||
}
|
||||
g_clear_pointer (&self->change_permission_combos, g_list_free);
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -4133,7 +4131,7 @@ on_change_permissions_clicked (GtkWidget *button,
|
|||
set_active_from_umask (combo, PERMISSION_OTHER, TRUE);
|
||||
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (on_change_permissions_response), self);
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -4173,7 +4171,7 @@ setup_permissions_page (NautilusPropertiesWindow *self)
|
|||
|
||||
if (self->has_recursive_apply)
|
||||
{
|
||||
gtk_widget_show_all (self->change_permissions_button_box);
|
||||
gtk_widget_show (self->change_permissions_button_box);
|
||||
g_signal_connect (self->change_permissions_button, "clicked",
|
||||
G_CALLBACK (on_change_permissions_clicked),
|
||||
self);
|
||||
|
@ -4234,10 +4232,10 @@ append_extension_pages (NautilusPropertiesWindow *self)
|
|||
|
||||
gtk_notebook_append_page (self->notebook,
|
||||
page_widget, label);
|
||||
gtk_container_child_set (GTK_CONTAINER (self->notebook),
|
||||
page_widget,
|
||||
"tab-expand", TRUE,
|
||||
NULL);
|
||||
g_object_set (gtk_notebook_get_page (GTK_NOTEBOOK (self->notebook),
|
||||
GTK_WIDGET (page_widget)),
|
||||
"tab-expand", TRUE,
|
||||
NULL);
|
||||
|
||||
g_object_set_data (G_OBJECT (page_widget),
|
||||
"is-extension-page",
|
||||
|
@ -4441,7 +4439,7 @@ add_clicked_cb (GtkButton *button,
|
|||
g_app_info_get_display_name (info), error->message);
|
||||
show_dialog (_("Could not add application"),
|
||||
message,
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))),
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
GTK_MESSAGE_ERROR);
|
||||
}
|
||||
else
|
||||
|
@ -4469,7 +4467,7 @@ forget_clicked_cb (GtkButton *button,
|
|||
{
|
||||
show_dialog (_("Could not forget association"),
|
||||
error->message,
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))),
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
GTK_MESSAGE_ERROR);
|
||||
}
|
||||
|
||||
|
@ -4514,7 +4512,7 @@ set_as_default_clicked_cb (GtkButton *button,
|
|||
g_app_info_get_display_name (info), error->message);
|
||||
show_dialog (_("Could not set as default"),
|
||||
message,
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))),
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
GTK_MESSAGE_ERROR);
|
||||
}
|
||||
|
||||
|
@ -4702,8 +4700,8 @@ create_properties_window (StartupData *startup_data)
|
|||
|
||||
if (startup_data->parent_widget)
|
||||
{
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (startup_data->parent_widget));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (startup_data->parent_widget));
|
||||
}
|
||||
|
||||
if (startup_data->parent_window)
|
||||
|
@ -4997,8 +4995,8 @@ nautilus_properties_window_present (GList *original_f
|
|||
{
|
||||
if (parent_widget)
|
||||
{
|
||||
gtk_window_set_screen (GTK_WINDOW (existing_window),
|
||||
gtk_widget_get_screen (parent_widget));
|
||||
gtk_window_set_display (GTK_WINDOW (existing_window),
|
||||
gtk_widget_get_display (parent_widget));
|
||||
}
|
||||
else if (startup_id)
|
||||
{
|
||||
|
@ -5238,14 +5236,16 @@ select_image_button_callback (GtkWidget *widget,
|
|||
|
||||
if (dialog == NULL)
|
||||
{
|
||||
g_autoptr (GFile) pictures_location = NULL;
|
||||
dialog = gtk_file_chooser_dialog_new (_("Select Custom Icon"), GTK_WINDOW (self),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
_("_Revert"), GTK_RESPONSE_NO,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Open"), GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
pictures_location = g_file_new_for_path (g_get_user_special_dir (G_USER_DIRECTORY_PICTURES));
|
||||
gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog),
|
||||
g_get_user_special_dir (G_USER_DIRECTORY_PICTURES),
|
||||
pictures_location,
|
||||
NULL);
|
||||
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
|
@ -5273,9 +5273,9 @@ select_image_button_callback (GtkWidget *widget,
|
|||
|
||||
if (image_location != NULL)
|
||||
{
|
||||
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog),
|
||||
image_location,
|
||||
NULL);
|
||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog),
|
||||
image_location,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5304,7 +5304,6 @@ select_image_button_callback (GtkWidget *widget,
|
|||
static void
|
||||
nautilus_properties_window_class_init (NautilusPropertiesWindowClass *klass)
|
||||
{
|
||||
GtkBindingSet *binding_set;
|
||||
GtkWidgetClass *widget_class;
|
||||
GObjectClass *oclass;
|
||||
|
||||
|
@ -5313,15 +5312,9 @@ nautilus_properties_window_class_init (NautilusPropertiesWindowClass *klass)
|
|||
oclass->dispose = real_dispose;
|
||||
oclass->finalize = real_finalize;
|
||||
|
||||
binding_set = gtk_binding_set_by_class (klass);
|
||||
g_signal_new ("close",
|
||||
G_OBJECT_CLASS_TYPE (klass),
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
|
||||
"close", 0);
|
||||
gtk_widget_class_add_binding (widget_class,
|
||||
GDK_KEY_Escape, 0,
|
||||
(GtkShortcutFunc) gtk_window_close, NULL);
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/nautilus/ui/nautilus-properties-window.ui");
|
||||
|
||||
|
@ -5414,5 +5407,4 @@ static void
|
|||
nautilus_properties_window_init (NautilusPropertiesWindow *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
g_signal_connect (self, "close", G_CALLBACK (gtk_window_close), NULL);
|
||||
}
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <libhandy-1/handy.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
#define NAUTILUS_TYPE_PROPERTIES_WINDOW (nautilus_properties_window_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (NautilusPropertiesWindow, nautilus_properties_window,
|
||||
NAUTILUS, PROPERTIES_WINDOW,
|
||||
HdyWindow)
|
||||
AdwWindow)
|
||||
|
||||
typedef void (* NautilusPropertiesWindowCallback) (gpointer callback_data);
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "nautilus-search-popover.h"
|
||||
#include "nautilus-mime-actions.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
struct _NautilusQueryEditor
|
||||
{
|
||||
|
@ -146,7 +145,7 @@ nautilus_query_editor_dispose (GObject *object)
|
|||
G_OBJECT_CLASS (nautilus_query_editor_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
nautilus_query_editor_grab_focus (GtkWidget *widget)
|
||||
{
|
||||
NautilusQueryEditor *editor;
|
||||
|
@ -156,9 +155,10 @@ nautilus_query_editor_grab_focus (GtkWidget *widget)
|
|||
if (gtk_widget_get_visible (widget) && !gtk_widget_is_focus (editor->entry))
|
||||
{
|
||||
/* avoid selecting the entry text */
|
||||
gtk_widget_grab_focus (editor->entry);
|
||||
gtk_editable_set_position (GTK_EDITABLE (editor->entry), -1);
|
||||
return gtk_entry_grab_focus_without_selecting (GTK_ENTRY (editor->entry));
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -243,6 +243,7 @@ nautilus_query_editor_class_init (NautilusQueryEditorClass *class)
|
|||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
g_autoptr (GtkShortcut) shortcut = NULL;
|
||||
|
||||
gobject_class = G_OBJECT_CLASS (class);
|
||||
gobject_class->finalize = nautilus_query_editor_finalize;
|
||||
|
@ -289,11 +290,9 @@ nautilus_query_editor_class_init (NautilusQueryEditorClass *class)
|
|||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
gtk_binding_entry_add_signal (gtk_binding_set_by_class (class),
|
||||
GDK_KEY_Down,
|
||||
0,
|
||||
"focus-view",
|
||||
0);
|
||||
shortcut = gtk_shortcut_new (gtk_keyval_trigger_new (GDK_KEY_Down, 0),
|
||||
gtk_signal_action_new ("focus-view"));
|
||||
gtk_widget_class_add_shortcut (widget_class, shortcut);
|
||||
|
||||
/**
|
||||
* NautilusQueryEditor::location:
|
||||
|
@ -352,7 +351,7 @@ create_query (NautilusQueryEditor *editor)
|
|||
|
||||
nautilus_query_set_search_content (query, fts_enabled);
|
||||
|
||||
nautilus_query_set_text (query, gtk_entry_get_text (GTK_ENTRY (editor->entry)));
|
||||
nautilus_query_set_text (query, gtk_editable_get_text (GTK_EDITABLE (editor->entry)));
|
||||
nautilus_query_set_location (query, editor->location);
|
||||
|
||||
/* We only set the query using the global setting for recursivity here,
|
||||
|
@ -387,7 +386,7 @@ entry_changed_cb (GtkWidget *entry,
|
|||
{
|
||||
g_autofree gchar *text = NULL;
|
||||
|
||||
text = g_strdup (gtk_entry_get_text (GTK_ENTRY (editor->entry)));
|
||||
text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (editor->entry)));
|
||||
text = g_strstrip (text);
|
||||
|
||||
nautilus_query_set_text (editor->query, text);
|
||||
|
@ -637,7 +636,7 @@ setup_widgets (NautilusQueryEditor *editor)
|
|||
G_CALLBACK (search_popover_fts_changed_cb), editor);
|
||||
|
||||
/* show everything */
|
||||
gtk_widget_show_all (vbox);
|
||||
gtk_widget_show (vbox);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -740,11 +739,11 @@ nautilus_query_editor_set_query (NautilusQueryEditor *self,
|
|||
|
||||
self->change_frozen = TRUE;
|
||||
|
||||
current_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (self->entry)));
|
||||
current_text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (self->entry)));
|
||||
current_text = g_strstrip (current_text);
|
||||
if (!g_str_equal (current_text, text))
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (self->entry), text);
|
||||
gtk_editable_set_text (GTK_EDITABLE (self->entry), text);
|
||||
}
|
||||
|
||||
if (g_set_object (&self->query, query))
|
||||
|
@ -763,7 +762,7 @@ nautilus_query_editor_set_text (NautilusQueryEditor *self,
|
|||
g_return_if_fail (text != NULL);
|
||||
|
||||
/* The handler of the entry will take care of everything */
|
||||
gtk_entry_set_text (GTK_ENTRY (self->entry), text);
|
||||
gtk_editable_set_text (GTK_EDITABLE (self->entry), text);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -779,7 +778,7 @@ nautilus_gtk_search_entry_is_keynav_event (guint keyval,
|
|||
keyval == GDK_KEY_End || keyval == GDK_KEY_KP_End ||
|
||||
keyval == GDK_KEY_Page_Up || keyval == GDK_KEY_KP_Page_Up ||
|
||||
keyval == GDK_KEY_Page_Down || keyval == GDK_KEY_KP_Page_Down ||
|
||||
((state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) != 0))
|
||||
((state & (GDK_CONTROL_MASK | GDK_ALT_MASK)) != 0))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -44,8 +44,6 @@ struct _NautilusRenameFilePopoverController
|
|||
gulong closed_handler_id;
|
||||
gulong file_changed_handler_id;
|
||||
gulong key_press_event_handler_id;
|
||||
|
||||
GtkEventController *key_controller;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (NautilusRenameFilePopoverController, nautilus_rename_file_popover_controller, NAUTILUS_TYPE_FILE_NAME_WIDGET_CONTROLLER)
|
||||
|
@ -208,7 +206,7 @@ name_entry_on_f2_pressed (GtkWidget *widget,
|
|||
gint end_offset;
|
||||
|
||||
/* Select the name part without the file extension */
|
||||
eel_filename_get_rename_region (gtk_entry_get_text (GTK_ENTRY (widget)),
|
||||
eel_filename_get_rename_region (gtk_editable_get_text (GTK_EDITABLE (widget)),
|
||||
&start_offset, &end_offset);
|
||||
gtk_editable_select_region (GTK_EDITABLE (widget),
|
||||
start_offset, end_offset);
|
||||
|
@ -225,7 +223,7 @@ name_entry_on_undo (GtkWidget *widget,
|
|||
|
||||
edit_name = nautilus_file_get_edit_name (self->target_file);
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (widget), edit_name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (widget), edit_name);
|
||||
|
||||
gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
|
||||
|
||||
|
@ -324,6 +322,7 @@ nautilus_rename_file_popover_controller_show_for_file (NautilusRenameFilePopov
|
|||
GtkWidget *relative_to)
|
||||
{
|
||||
g_autoptr (NautilusDirectory) containing_directory = NULL;
|
||||
GtkEventController *controller;
|
||||
g_autofree gchar *edit_name = NULL;
|
||||
gint n_chars;
|
||||
|
||||
|
@ -361,11 +360,10 @@ nautilus_rename_file_popover_controller_show_for_file (NautilusRenameFilePopov
|
|||
G_CALLBACK (target_file_on_changed),
|
||||
self);
|
||||
|
||||
self->key_controller = gtk_event_controller_key_new (self->name_entry);
|
||||
g_signal_connect (self->key_controller,
|
||||
"key-pressed",
|
||||
G_CALLBACK (on_event_controller_key_key_pressed),
|
||||
self);
|
||||
controller = gtk_event_controller_key_new ();
|
||||
gtk_widget_add_controller (self->name_entry, controller);
|
||||
g_signal_connect (controller, "key-pressed",
|
||||
G_CALLBACK (on_event_controller_key_key_pressed), self);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (self->title_label),
|
||||
self->target_is_folder ? _("Rename Folder") :
|
||||
|
@ -373,10 +371,10 @@ nautilus_rename_file_popover_controller_show_for_file (NautilusRenameFilePopov
|
|||
|
||||
edit_name = nautilus_file_get_edit_name (self->target_file);
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (self->name_entry), edit_name);
|
||||
gtk_editable_set_text (GTK_EDITABLE (self->name_entry), edit_name);
|
||||
|
||||
gtk_popover_set_pointing_to (GTK_POPOVER (self->rename_file_popover), pointing_to);
|
||||
gtk_popover_set_relative_to (GTK_POPOVER (self->rename_file_popover), relative_to);
|
||||
gtk_widget_set_parent (self->rename_file_popover, relative_to);
|
||||
|
||||
gtk_popover_popup (GTK_POPOVER (self->rename_file_popover));
|
||||
|
||||
|
@ -393,9 +391,9 @@ nautilus_rename_file_popover_controller_show_for_file (NautilusRenameFilePopov
|
|||
}
|
||||
|
||||
n_chars = g_utf8_strlen (edit_name, -1);
|
||||
gtk_entry_set_width_chars (GTK_ENTRY (self->name_entry),
|
||||
MIN (MAX (n_chars, RENAME_ENTRY_MIN_CHARS),
|
||||
RENAME_ENTRY_MAX_CHARS));
|
||||
gtk_editable_set_width_chars (GTK_EDITABLE (self->name_entry),
|
||||
MIN (MAX (n_chars, RENAME_ENTRY_MIN_CHARS),
|
||||
RENAME_ENTRY_MAX_CHARS));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -423,10 +421,7 @@ nautilus_rename_file_popover_controller_finalize (GObject *object)
|
|||
|
||||
reset_state (self);
|
||||
|
||||
gtk_widget_destroy (self->rename_file_popover);
|
||||
g_clear_object (&self->rename_file_popover);
|
||||
|
||||
g_clear_object (&self->key_controller);
|
||||
g_clear_pointer (&self->rename_file_popover, gtk_widget_unparent);
|
||||
|
||||
G_OBJECT_CLASS (nautilus_rename_file_popover_controller_parent_class)->finalize (object);
|
||||
}
|
||||
|
|
|
@ -232,9 +232,8 @@ recent_thread_func (gpointer user_data)
|
|||
if (rank > 0)
|
||||
{
|
||||
NautilusSearchHit *hit;
|
||||
time_t modified, visited;
|
||||
g_autoptr (GDateTime) gmodified = NULL;
|
||||
g_autoptr (GDateTime) gvisited = NULL;
|
||||
GDateTime *modified;
|
||||
GDateTime *visited;
|
||||
|
||||
if (gtk_recent_info_is_local (info))
|
||||
{
|
||||
|
@ -281,9 +280,6 @@ recent_thread_func (gpointer user_data)
|
|||
modified = gtk_recent_info_get_modified (info);
|
||||
visited = gtk_recent_info_get_visited (info);
|
||||
|
||||
gmodified = g_date_time_new_from_unix_local (modified);
|
||||
gvisited = g_date_time_new_from_unix_local (visited);
|
||||
|
||||
if (date_range != NULL)
|
||||
{
|
||||
NautilusQuerySearchType type;
|
||||
|
@ -297,11 +293,11 @@ recent_thread_func (gpointer user_data)
|
|||
|
||||
if (type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS)
|
||||
{
|
||||
target_time = visited;
|
||||
target_time = g_date_time_to_unix (visited);
|
||||
}
|
||||
else if (type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_MODIFIED)
|
||||
{
|
||||
target_time = modified;
|
||||
target_time = g_date_time_to_unix (modified);
|
||||
}
|
||||
|
||||
if (!nautilus_file_date_in_between (target_time,
|
||||
|
@ -313,8 +309,8 @@ recent_thread_func (gpointer user_data)
|
|||
|
||||
hit = nautilus_search_hit_new (uri);
|
||||
nautilus_search_hit_set_fts_rank (hit, rank);
|
||||
nautilus_search_hit_set_modification_time (hit, gmodified);
|
||||
nautilus_search_hit_set_access_time (hit, gvisited);
|
||||
nautilus_search_hit_set_modification_time (hit, modified);
|
||||
nautilus_search_hit_set_access_time (hit, visited);
|
||||
|
||||
hits = g_list_prepend (hits, hit);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "nautilus-file.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-global-preferences.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
#define SEARCH_FILTER_MAX_YEARS 5
|
||||
|
||||
|
@ -92,12 +91,9 @@ calendar_day_selected (GtkCalendar *calendar,
|
|||
NautilusSearchPopover *popover)
|
||||
{
|
||||
GDateTime *date;
|
||||
guint year, month, day;
|
||||
GPtrArray *date_range;
|
||||
|
||||
gtk_calendar_get_date (calendar, &year, &month, &day);
|
||||
|
||||
date = g_date_time_new_local (year, month + 1, day, 0, 0, 0);
|
||||
date = gtk_calendar_get_date (calendar);
|
||||
|
||||
date_range = g_ptr_array_new_full (2, (GDestroyNotify) g_date_time_unref);
|
||||
g_ptr_array_add (date_range, g_date_time_ref (date));
|
||||
|
@ -127,12 +123,7 @@ setup_date (NautilusSearchPopover *popover,
|
|||
|
||||
g_signal_handlers_block_by_func (popover->calendar, calendar_day_selected, popover);
|
||||
|
||||
gtk_calendar_select_month (GTK_CALENDAR (popover->calendar),
|
||||
g_date_time_get_month (date_initial) - 1,
|
||||
g_date_time_get_year (date_initial));
|
||||
|
||||
gtk_calendar_select_day (GTK_CALENDAR (popover->calendar),
|
||||
g_date_time_get_day_of_month (date_initial));
|
||||
gtk_calendar_select_day (GTK_CALENDAR (popover->calendar), date_initial);
|
||||
|
||||
update_date_label (popover, date_range);
|
||||
|
||||
|
@ -166,7 +157,7 @@ date_entry_activate (GtkEntry *entry,
|
|||
GDate *date;
|
||||
|
||||
date = g_date_new ();
|
||||
g_date_set_parse (date, gtk_entry_get_text (entry));
|
||||
g_date_set_parse (date, gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||
|
||||
/* Invalid date silently does nothing */
|
||||
if (!g_date_valid (date))
|
||||
|
@ -343,16 +334,16 @@ types_listbox_row_activated (GtkListBox *listbox,
|
|||
}
|
||||
|
||||
static void
|
||||
search_time_type_changed (GtkToggleButton *button,
|
||||
search_time_type_changed (GtkCheckButton *button,
|
||||
NautilusSearchPopover *popover)
|
||||
{
|
||||
NautilusQuerySearchType type = -1;
|
||||
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (popover->last_modified_button)))
|
||||
if (gtk_check_button_get_active (GTK_CHECK_BUTTON (popover->last_modified_button)))
|
||||
{
|
||||
type = NAUTILUS_QUERY_SEARCH_TYPE_LAST_MODIFIED;
|
||||
}
|
||||
else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (popover->last_used_button)))
|
||||
else if (gtk_check_button_get_active (GTK_CHECK_BUTTON (popover->last_used_button)))
|
||||
{
|
||||
type = NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS;
|
||||
}
|
||||
|
@ -407,7 +398,7 @@ create_row_for_label (const gchar *text,
|
|||
NULL);
|
||||
|
||||
gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), label);
|
||||
gtk_widget_show_all (row);
|
||||
gtk_widget_show (row);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
@ -575,7 +566,7 @@ on_other_types_dialog_response (GtkDialog *dialog,
|
|||
}
|
||||
|
||||
g_clear_object (&popover->treeview);
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -587,7 +578,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
|
|||
GtkListStore *store;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkWidget *toplevel;
|
||||
GtkRoot *toplevel;
|
||||
GtkTreeSelection *selection;
|
||||
|
||||
mime_infos = g_content_types_get_registered ();
|
||||
|
@ -616,7 +607,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
|
|||
}
|
||||
g_list_free (mime_infos);
|
||||
|
||||
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (popover));
|
||||
toplevel = gtk_widget_get_root (GTK_WIDGET (popover));
|
||||
dialog = gtk_dialog_new_with_buttons (_("Select type"),
|
||||
GTK_WINDOW (toplevel),
|
||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR,
|
||||
|
@ -625,7 +616,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
|
|||
NULL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 600);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -655,7 +646,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
|
|||
popover->treeview = GTK_TREE_VIEW (g_object_ref (treeview));
|
||||
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (on_other_types_dialog_response), popover);
|
||||
gtk_widget_show_all (dialog);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -677,7 +668,7 @@ update_date_label (NautilusSearchPopover *popover,
|
|||
|
||||
label = get_text_for_date_range (date_range, TRUE);
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (popover->date_entry), days < 1 ? label : "");
|
||||
gtk_editable_set_text (GTK_EDITABLE (popover->date_entry), days < 1 ? label : "");
|
||||
|
||||
gtk_widget_show (popover->clear_date_button);
|
||||
gtk_label_set_label (GTK_LABEL (popover->select_date_button_label), label);
|
||||
|
@ -689,7 +680,7 @@ update_date_label (NautilusSearchPopover *popover,
|
|||
{
|
||||
gtk_label_set_label (GTK_LABEL (popover->select_date_button_label),
|
||||
_("Select Dates…"));
|
||||
gtk_entry_set_text (GTK_ENTRY (popover->date_entry), "");
|
||||
gtk_editable_set_text (GTK_EDITABLE (popover->date_entry), "");
|
||||
gtk_widget_hide (popover->clear_date_button);
|
||||
}
|
||||
}
|
||||
|
@ -725,12 +716,7 @@ nautilus_search_popover_closed (GtkPopover *popover)
|
|||
/* Reselect today at the calendar */
|
||||
g_signal_handlers_block_by_func (self->calendar, calendar_day_selected, self);
|
||||
|
||||
gtk_calendar_select_month (GTK_CALENDAR (self->calendar),
|
||||
g_date_time_get_month (now) - 1,
|
||||
g_date_time_get_year (now));
|
||||
|
||||
gtk_calendar_select_day (GTK_CALENDAR (self->calendar),
|
||||
g_date_time_get_day_of_month (now));
|
||||
gtk_calendar_select_day (GTK_CALENDAR (self->calendar), now);
|
||||
|
||||
g_signal_handlers_unblock_by_func (self->calendar, calendar_day_selected, self);
|
||||
}
|
||||
|
@ -926,21 +912,21 @@ nautilus_search_popover_init (NautilusSearchPopover *self)
|
|||
filter_time_type = g_settings_get_enum (nautilus_preferences, "search-filter-time-type");
|
||||
if (filter_time_type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_MODIFIED)
|
||||
{
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_modified_button), TRUE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_used_button), FALSE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->created_button), FALSE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_modified_button), TRUE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_used_button), FALSE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->created_button), FALSE);
|
||||
}
|
||||
else if (filter_time_type == NAUTILUS_QUERY_SEARCH_TYPE_LAST_ACCESS)
|
||||
{
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_modified_button), FALSE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_used_button), TRUE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->created_button), FALSE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_modified_button), FALSE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_used_button), TRUE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->created_button), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_modified_button), FALSE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->last_used_button), FALSE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->created_button), TRUE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_modified_button), FALSE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->last_used_button), FALSE);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (self->created_button), TRUE);
|
||||
}
|
||||
|
||||
self->fts_enabled = g_settings_get_boolean (nautilus_preferences,
|
||||
|
|
|
@ -619,7 +619,7 @@ result_list_attributes_ready_cb (GList *file_list,
|
|||
GVariant *meta_variant;
|
||||
gint icon_scale;
|
||||
|
||||
icon_scale = gdk_monitor_get_scale_factor (gdk_display_get_monitor (gdk_display_get_default (), 0));
|
||||
icon_scale = gdk_monitor_get_scale_factor (g_list_model_get_item (gdk_display_get_monitors (gdk_display_get_default ()), 0));
|
||||
|
||||
for (l = file_list; l != NULL; l = l->next)
|
||||
{
|
||||
|
@ -658,9 +658,9 @@ result_list_attributes_ready_cb (GList *file_list,
|
|||
|
||||
if (gicon == NULL)
|
||||
{
|
||||
gicon = G_ICON (nautilus_file_get_icon_pixbuf (file, 128,
|
||||
icon_scale,
|
||||
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS));
|
||||
gicon = G_ICON (nautilus_file_get_icon_texture (file, 128,
|
||||
icon_scale,
|
||||
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS));
|
||||
}
|
||||
|
||||
g_variant_builder_add (&meta, "{sv}",
|
||||
|
@ -739,12 +739,13 @@ typedef struct
|
|||
} ShowURIData;
|
||||
|
||||
static void
|
||||
show_uri_callback (gboolean res,
|
||||
gpointer user_data)
|
||||
show_uri_callback (GObject *source_object,
|
||||
GAsyncResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
ShowURIData *data = user_data;
|
||||
|
||||
if (!res)
|
||||
if (!gtk_show_uri_full_finish (NULL, result, NULL))
|
||||
{
|
||||
g_application_open (g_application_get_default (), &data->file, 1, "");
|
||||
}
|
||||
|
@ -764,16 +765,13 @@ handle_activate_result (NautilusShellSearchProvider2 *skeleton,
|
|||
gpointer user_data)
|
||||
{
|
||||
ShowURIData *data;
|
||||
gboolean res;
|
||||
|
||||
data = g_new (ShowURIData, 1);
|
||||
data->file = g_file_new_for_uri (result);
|
||||
data->skeleton = skeleton;
|
||||
data->invocation = invocation;
|
||||
|
||||
res = gtk_show_uri_on_window (NULL, result, timestamp, NULL);
|
||||
|
||||
show_uri_callback (res, data);
|
||||
gtk_show_uri_full (NULL, result, timestamp, NULL, show_uri_callback, data);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -24,11 +24,10 @@
|
|||
|
||||
#include "nautilus-special-location-bar.h"
|
||||
#include "nautilus-enum-types.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
struct _NautilusSpecialLocationBar
|
||||
{
|
||||
GtkBin parent_instance;
|
||||
AdwBin parent_instance;
|
||||
|
||||
GtkWidget *label;
|
||||
GtkWidget *learn_more_label;
|
||||
|
@ -41,7 +40,7 @@ enum
|
|||
PROP_SPECIAL_LOCATION,
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (NautilusSpecialLocationBar, nautilus_special_location_bar, GTK_TYPE_BIN)
|
||||
G_DEFINE_TYPE (NautilusSpecialLocationBar, nautilus_special_location_bar, ADW_TYPE_BIN)
|
||||
|
||||
static void
|
||||
set_special_location (NautilusSpecialLocationBar *bar,
|
||||
|
|
|
@ -20,11 +20,12 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gio/gio.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define NAUTILUS_TYPE_SPECIAL_LOCATION_BAR (nautilus_special_location_bar_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (NautilusSpecialLocationBar, nautilus_special_location_bar, NAUTILUS, SPECIAL_LOCATION_BAR, GtkBin)
|
||||
G_DECLARE_FINAL_TYPE (NautilusSpecialLocationBar, nautilus_special_location_bar, NAUTILUS, SPECIAL_LOCATION_BAR, AdwBin)
|
||||
|
||||
typedef enum {
|
||||
NAUTILUS_SPECIAL_LOCATION_TEMPLATES,
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "nautilus-toolbar-menu-sections.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-window.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
#define OPERATION_MINIMUM_TIME 2 /*s */
|
||||
#define NEEDS_ATTENTION_ANIMATION_TIMEOUT 2000 /*ms */
|
||||
|
@ -54,7 +53,7 @@ typedef enum
|
|||
|
||||
struct _NautilusToolbar
|
||||
{
|
||||
GtkBin parent_instance;
|
||||
AdwBin parent_instance;
|
||||
|
||||
NautilusWindow *window;
|
||||
|
||||
|
@ -89,13 +88,9 @@ struct _NautilusToolbar
|
|||
|
||||
GtkWidget *forward_button;
|
||||
GtkWidget *forward_menu;
|
||||
GtkGesture *forward_button_longpress_gesture;
|
||||
GtkGesture *forward_button_multi_press_gesture;
|
||||
|
||||
GtkWidget *back_button;
|
||||
GtkWidget *back_menu;
|
||||
GtkGesture *back_button_longpress_gesture;
|
||||
GtkGesture *back_button_multi_press_gesture;
|
||||
|
||||
GtkWidget *search_button;
|
||||
|
||||
|
@ -121,7 +116,7 @@ enum
|
|||
|
||||
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
|
||||
|
||||
G_DEFINE_TYPE (NautilusToolbar, nautilus_toolbar, GTK_TYPE_BIN);
|
||||
G_DEFINE_TYPE (NautilusToolbar, nautilus_toolbar, ADW_TYPE_BIN);
|
||||
|
||||
static void nautilus_toolbar_set_window_slot_real (NautilusToolbar *self,
|
||||
NautilusWindowSlot *slot);
|
||||
|
@ -186,7 +181,7 @@ show_menu (NautilusToolbar *self,
|
|||
{
|
||||
g_autoptr (GMenu) menu = NULL;
|
||||
NautilusNavigationDirection direction;
|
||||
GtkPopover *popover;
|
||||
GtkPopoverMenu *popover;
|
||||
|
||||
menu = g_menu_new ();
|
||||
|
||||
|
@ -198,14 +193,14 @@ show_menu (NautilusToolbar *self,
|
|||
case NAUTILUS_NAVIGATION_DIRECTION_FORWARD:
|
||||
{
|
||||
fill_menu (self, menu, FALSE);
|
||||
popover = GTK_POPOVER (self->forward_menu);
|
||||
popover = GTK_POPOVER_MENU (self->forward_menu);
|
||||
}
|
||||
break;
|
||||
|
||||
case NAUTILUS_NAVIGATION_DIRECTION_BACK:
|
||||
{
|
||||
fill_menu (self, menu, TRUE);
|
||||
popover = GTK_POPOVER (self->back_menu);
|
||||
popover = GTK_POPOVER_MENU (self->back_menu);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -216,16 +211,16 @@ show_menu (NautilusToolbar *self,
|
|||
break;
|
||||
}
|
||||
|
||||
gtk_popover_bind_model (popover, G_MENU_MODEL (menu), NULL);
|
||||
gtk_popover_popup (popover);
|
||||
gtk_popover_menu_set_menu_model (popover, G_MENU_MODEL (menu));
|
||||
gtk_popover_popup (GTK_POPOVER (popover));
|
||||
}
|
||||
|
||||
static void
|
||||
navigation_button_press_cb (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
navigation_button_press_cb (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusToolbar *self;
|
||||
GtkWidget *widget;
|
||||
|
@ -575,25 +570,26 @@ on_new_progress_info (NautilusProgressInfoManager *manager,
|
|||
}
|
||||
|
||||
static void
|
||||
on_operations_icon_draw (GtkWidget *widget,
|
||||
on_operations_icon_draw (GtkDrawingArea *drawing_area,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
NautilusToolbar *self)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (drawing_area);
|
||||
gfloat elapsed_progress = 0;
|
||||
gint remaining_progress = 0;
|
||||
gint total_progress;
|
||||
gdouble ratio;
|
||||
GList *progress_infos;
|
||||
GList *l;
|
||||
guint width;
|
||||
guint height;
|
||||
gboolean all_cancelled;
|
||||
GdkRGBA background;
|
||||
GdkRGBA foreground;
|
||||
GtkStyleContext *style_context;
|
||||
|
||||
style_context = gtk_widget_get_style_context (widget);
|
||||
gtk_style_context_get_color (style_context, gtk_style_context_get_state (style_context), &foreground);
|
||||
gtk_style_context_get_color (style_context, &foreground);
|
||||
background = foreground;
|
||||
background.alpha *= 0.3;
|
||||
|
||||
|
@ -788,7 +784,7 @@ operations_list_create_widget (GObject *item,
|
|||
GtkWidget *widget;
|
||||
|
||||
widget = nautilus_progress_info_widget_new (info);
|
||||
gtk_widget_show_all (widget);
|
||||
gtk_widget_show (widget);
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
@ -797,6 +793,7 @@ static void
|
|||
nautilus_toolbar_constructed (GObject *object)
|
||||
{
|
||||
NautilusToolbar *self = NAUTILUS_TOOLBAR (object);
|
||||
GtkEventController *controller;
|
||||
|
||||
self->path_bar = GTK_WIDGET (g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL));
|
||||
gtk_box_append (GTK_BOX (self->path_bar_container),
|
||||
|
@ -805,8 +802,7 @@ nautilus_toolbar_constructed (GObject *object)
|
|||
self->location_entry = nautilus_location_entry_new ();
|
||||
gtk_box_append (GTK_BOX (self->location_entry_container),
|
||||
self->location_entry);
|
||||
self->location_entry_close_button = gtk_button_new_from_icon_name ("window-close-symbolic",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
self->location_entry_close_button = gtk_button_new_from_icon_name ("window-close-symbolic");
|
||||
gtk_box_append (GTK_BOX (self->location_entry_container),
|
||||
self->location_entry_close_button);
|
||||
g_signal_connect (self->location_entry_close_button, "clicked",
|
||||
|
@ -826,12 +822,14 @@ nautilus_toolbar_constructed (GObject *object)
|
|||
NULL);
|
||||
update_operations (self);
|
||||
|
||||
self->back_button_longpress_gesture = gtk_gesture_long_press_new (self->back_button);
|
||||
g_signal_connect (self->back_button_longpress_gesture, "pressed",
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_long_press_new ());
|
||||
gtk_widget_add_controller (self->back_button, controller);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (back_button_longpress_cb), self);
|
||||
|
||||
self->forward_button_longpress_gesture = gtk_gesture_long_press_new (self->forward_button);
|
||||
g_signal_connect (self->forward_button_longpress_gesture, "pressed",
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_long_press_new ());
|
||||
gtk_widget_add_controller (self->forward_button, controller);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (forward_button_longpress_cb), self);
|
||||
|
||||
g_object_set_data (G_OBJECT (self->back_button), "nav-direction",
|
||||
|
@ -839,17 +837,16 @@ nautilus_toolbar_constructed (GObject *object)
|
|||
g_object_set_data (G_OBJECT (self->forward_button), "nav-direction",
|
||||
GUINT_TO_POINTER (NAUTILUS_NAVIGATION_DIRECTION_FORWARD));
|
||||
|
||||
|
||||
self->back_button_multi_press_gesture = gtk_gesture_multi_press_new (self->back_button);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (self->back_button_multi_press_gesture),
|
||||
GDK_BUTTON_SECONDARY);
|
||||
g_signal_connect (self->back_button_multi_press_gesture, "pressed",
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
gtk_widget_add_controller (self->back_button, controller);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), GDK_BUTTON_SECONDARY);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (navigation_button_press_cb), self);
|
||||
|
||||
self->forward_button_multi_press_gesture = gtk_gesture_multi_press_new (self->forward_button);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (self->forward_button_multi_press_gesture),
|
||||
GDK_BUTTON_SECONDARY);
|
||||
g_signal_connect (self->forward_button_multi_press_gesture, "pressed",
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
gtk_widget_add_controller (self->forward_button, controller);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), GDK_BUTTON_SECONDARY);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (navigation_button_press_cb), self);
|
||||
|
||||
g_signal_connect (self->operations_popover, "show",
|
||||
|
@ -861,9 +858,9 @@ nautilus_toolbar_constructed (GObject *object)
|
|||
|
||||
/* Setting a max width on one entry to effectively set a max expansion for
|
||||
* the whole title widget. */
|
||||
gtk_entry_set_max_width_chars (GTK_ENTRY (self->location_entry), 88);
|
||||
gtk_editable_set_max_width_chars (GTK_EDITABLE (self->location_entry), 88);
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (self));
|
||||
gtk_widget_show (GTK_WIDGET (self));
|
||||
toolbar_update_appearance (self);
|
||||
}
|
||||
|
||||
|
@ -871,6 +868,16 @@ static void
|
|||
nautilus_toolbar_init (NautilusToolbar *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (self->operations_icon),
|
||||
(GtkDrawingAreaDrawFunc) on_operations_icon_draw,
|
||||
self,
|
||||
NULL);
|
||||
|
||||
gtk_widget_set_parent (self->back_menu, self->back_button);
|
||||
g_signal_connect (self->back_menu, "destroy", G_CALLBACK (gtk_widget_unparent), NULL);
|
||||
gtk_widget_set_parent (self->forward_menu, self->forward_button);
|
||||
g_signal_connect (self->forward_menu, "destroy", G_CALLBACK (gtk_widget_unparent), NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1031,10 +1038,10 @@ nautilus_toolbar_dispose (GObject *object)
|
|||
|
||||
self = NAUTILUS_TOOLBAR (object);
|
||||
|
||||
g_clear_object (&self->forward_button_multi_press_gesture);
|
||||
g_clear_object (&self->back_button_multi_press_gesture);
|
||||
g_clear_pointer (&self->icon_binding, g_binding_unbind);
|
||||
g_clear_pointer (&self->search_binding, g_binding_unbind);
|
||||
g_clear_pointer (&self->back_menu, gtk_widget_unparent);
|
||||
g_clear_pointer (&self->forward_menu, gtk_widget_unparent);
|
||||
|
||||
G_OBJECT_CLASS (nautilus_toolbar_parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -1066,9 +1073,6 @@ nautilus_toolbar_finalize (GObject *obj)
|
|||
g_signal_handlers_disconnect_by_func (self->window,
|
||||
on_window_focus_changed, self);
|
||||
|
||||
g_clear_object (&self->back_button_longpress_gesture);
|
||||
g_clear_object (&self->forward_button_longpress_gesture);
|
||||
|
||||
G_OBJECT_CLASS (nautilus_toolbar_parent_class)->finalize (obj);
|
||||
}
|
||||
|
||||
|
@ -1142,7 +1146,6 @@ nautilus_toolbar_class_init (NautilusToolbarClass *klass)
|
|||
|
||||
gtk_widget_class_bind_template_child (widget_class, NautilusToolbar, search_button);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_operations_icon_draw);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_operations_popover_notify_visible);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <libhandy-1/handy.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
#include "nautilus-window-slot.h"
|
||||
|
||||
|
@ -32,7 +32,7 @@ G_BEGIN_DECLS
|
|||
|
||||
#define NAUTILUS_TYPE_TOOLBAR nautilus_toolbar_get_type()
|
||||
|
||||
G_DECLARE_FINAL_TYPE (NautilusToolbar, nautilus_toolbar, NAUTILUS, TOOLBAR, GtkBin)
|
||||
G_DECLARE_FINAL_TYPE (NautilusToolbar, nautilus_toolbar, NAUTILUS, TOOLBAR, AdwBin)
|
||||
|
||||
GtkWidget *nautilus_toolbar_new (void);
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "nautilus-file.h"
|
||||
#include "nautilus-trash-monitor.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -49,13 +48,13 @@ enum
|
|||
|
||||
struct _NautilusTrashBar
|
||||
{
|
||||
GtkBin parent_instance;
|
||||
AdwBin parent_instance;
|
||||
|
||||
NautilusFilesView *view;
|
||||
gulong selection_handler_id;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (NautilusTrashBar, nautilus_trash_bar, GTK_TYPE_BIN)
|
||||
G_DEFINE_TYPE (NautilusTrashBar, nautilus_trash_bar, ADW_TYPE_BIN)
|
||||
|
||||
static void
|
||||
selection_changed_cb (NautilusFilesView *view,
|
||||
|
@ -68,7 +67,7 @@ selection_changed_cb (NautilusFilesView *view,
|
|||
selection = nautilus_view_get_selection (NAUTILUS_VIEW (view));
|
||||
count = g_list_length (selection);
|
||||
|
||||
info_bar = gtk_bin_get_child (GTK_BIN (bar));
|
||||
info_bar = adw_bin_get_child (ADW_BIN (bar));
|
||||
gtk_info_bar_set_response_sensitive (GTK_INFO_BAR (info_bar),
|
||||
TRASH_BAR_RESPONSE_RESTORE,
|
||||
(count > 0));
|
||||
|
@ -130,7 +129,7 @@ nautilus_trash_bar_trash_state_changed (NautilusTrashMonitor *trash_monitor,
|
|||
|
||||
bar = NAUTILUS_TRASH_BAR (data);
|
||||
|
||||
info_bar = gtk_bin_get_child (GTK_BIN (bar));
|
||||
info_bar = adw_bin_get_child (ADW_BIN (bar));
|
||||
gtk_info_bar_set_response_sensitive (GTK_INFO_BAR (info_bar),
|
||||
TRASH_BAR_RESPONSE_EMPTY,
|
||||
!nautilus_trash_monitor_is_empty ());
|
||||
|
@ -163,10 +162,10 @@ trash_bar_response_cb (GtkInfoBar *infobar,
|
|||
gpointer user_data)
|
||||
{
|
||||
NautilusTrashBar *bar;
|
||||
GtkWidget *window;
|
||||
GtkRoot *window;
|
||||
|
||||
bar = NAUTILUS_TRASH_BAR (user_data);
|
||||
window = gtk_widget_get_toplevel (GTK_WIDGET (bar));
|
||||
window = gtk_widget_get_root (GTK_WIDGET (bar));
|
||||
|
||||
switch (response_id)
|
||||
{
|
||||
|
@ -194,7 +193,7 @@ trash_bar_response_cb (GtkInfoBar *infobar,
|
|||
|
||||
case TRASH_BAR_RESPONSE_EMPTY:
|
||||
{
|
||||
nautilus_file_operations_empty_trash (window, TRUE, NULL);
|
||||
nautilus_file_operations_empty_trash (GTK_WIDGET (window), TRUE, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -23,12 +23,13 @@
|
|||
#include "nautilus-files-view.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define NAUTILUS_TYPE_TRASH_BAR (nautilus_trash_bar_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (NautilusTrashBar, nautilus_trash_bar, NAUTILUS, TRASH_BAR, GtkBin)
|
||||
G_DECLARE_FINAL_TYPE (NautilusTrashBar, nautilus_trash_bar, NAUTILUS, TRASH_BAR, AdwBin)
|
||||
|
||||
GtkWidget *nautilus_trash_bar_new (NautilusFilesView *view);
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ show_dialog (const gchar *primary_text,
|
|||
gtk_widget_show (dialog);
|
||||
|
||||
g_signal_connect (GTK_DIALOG (dialog), "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
G_CALLBACK (gtk_window_destroy), NULL);
|
||||
|
||||
return GTK_DIALOG (dialog);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "nautilus-directory.h"
|
||||
#include "nautilus-global-preferences.h"
|
||||
#include "nautilus-thumbnails.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
struct _NautilusViewIconController
|
||||
{
|
||||
|
@ -25,7 +24,6 @@ struct _NautilusViewIconController
|
|||
|
||||
gboolean single_click_mode;
|
||||
gboolean activate_on_release;
|
||||
GtkGesture *multi_press_gesture;
|
||||
|
||||
guint scroll_to_file_handle_id;
|
||||
guint prioritize_thumbnailing_handle_id;
|
||||
|
@ -429,8 +427,8 @@ static void
|
|||
reveal_item_ui (NautilusViewIconController *self,
|
||||
GtkWidget *item_ui)
|
||||
{
|
||||
int item_y;
|
||||
int item_height;
|
||||
gdouble item_y;
|
||||
gdouble item_height;
|
||||
|
||||
gtk_widget_translate_coordinates (item_ui, GTK_WIDGET (self->view_ui),
|
||||
0, 0,
|
||||
|
@ -769,17 +767,17 @@ activate_selection_on_click (NautilusViewIconController *self,
|
|||
}
|
||||
|
||||
static void
|
||||
on_button_press_event (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
on_button_press_event (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusViewIconController *self;
|
||||
guint button;
|
||||
GdkModifierType modifiers = 0;
|
||||
gint view_x;
|
||||
gint view_y;
|
||||
gdouble view_x;
|
||||
gdouble view_y;
|
||||
GtkFlowBoxChild *child_at_pos;
|
||||
|
||||
self = NAUTILUS_VIEW_ICON_CONTROLLER (user_data);
|
||||
|
@ -856,11 +854,11 @@ on_button_press_event (GtkGestureMultiPress *gesture,
|
|||
}
|
||||
|
||||
static void
|
||||
on_click_released (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
on_click_released (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (user_data);
|
||||
|
||||
|
@ -873,8 +871,8 @@ on_click_released (GtkGestureMultiPress *gesture,
|
|||
}
|
||||
|
||||
static void
|
||||
on_click_stopped (GtkGestureMultiPress *gesture,
|
||||
gpointer user_data)
|
||||
on_click_stopped (GtkGestureClick *gesture,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (user_data);
|
||||
|
||||
|
@ -889,8 +887,8 @@ on_longpress_gesture_pressed_callback (GtkGestureLongPress *gesture,
|
|||
{
|
||||
NautilusViewIconController *self;
|
||||
GtkFlowBoxChild *child_at_pos;
|
||||
gint view_x;
|
||||
gint view_y;
|
||||
gdouble view_x;
|
||||
gdouble view_y;
|
||||
|
||||
self = NAUTILUS_VIEW_ICON_CONTROLLER (user_data);
|
||||
|
||||
|
@ -944,9 +942,9 @@ static GtkFlowBoxChild *
|
|||
get_first_visible_item_ui (NautilusViewIconController *self)
|
||||
{
|
||||
GtkFlowBoxChild *child_at_0;
|
||||
gint x0;
|
||||
gint y0;
|
||||
gint scrolled_y;
|
||||
gdouble x0;
|
||||
gdouble y0;
|
||||
gdouble scrolled_y;
|
||||
|
||||
child_at_0 = gtk_flow_box_get_child_at_index (self->view_ui, 0);
|
||||
if (child_at_0 == NULL)
|
||||
|
@ -1001,7 +999,7 @@ scroll_to_file_on_idle (ScrollToFileData *data)
|
|||
g_autoptr (NautilusFile) file = NULL;
|
||||
NautilusViewItemModel *item;
|
||||
GtkWidget *item_ui;
|
||||
int item_y;
|
||||
gdouble item_y;
|
||||
|
||||
file = nautilus_file_get_existing_by_uri (data->uri);
|
||||
item = nautilus_view_model_get_item_from_file (self->model, file);
|
||||
|
@ -1191,7 +1189,6 @@ dispose (GObject *object)
|
|||
|
||||
self = NAUTILUS_VIEW_ICON_CONTROLLER (object);
|
||||
|
||||
g_clear_object (&self->multi_press_gesture);
|
||||
g_clear_handle_id (&self->scroll_to_file_handle_id, g_source_remove);
|
||||
g_clear_handle_id (&self->prioritize_thumbnailing_handle_id, g_source_remove);
|
||||
|
||||
|
@ -1214,7 +1211,7 @@ prioritize_thumbnailing_on_idle (NautilusViewIconController *self)
|
|||
GtkFlowBoxChild *next_child;
|
||||
gint first_index;
|
||||
gint next_index;
|
||||
gint y;
|
||||
gdouble y;
|
||||
gint last_index;
|
||||
gpointer item;
|
||||
NautilusFile *file;
|
||||
|
@ -1308,7 +1305,7 @@ setup_item_ui (GtkWidget **child,
|
|||
nautilus_view_item_ui_set_caption_attributes (item_ui, self->caption_attributes);
|
||||
|
||||
*child = GTK_WIDGET (item_ui);
|
||||
gtk_widget_show_all (*child);
|
||||
gtk_widget_show (*child);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
|
@ -1331,7 +1328,7 @@ create_view_ui (NautilusViewIconController *self)
|
|||
GtkFlowBox *flowbox;
|
||||
|
||||
widget = gtk_flow_box_new ();
|
||||
gtk_widget_set_can_focus (widget, TRUE);
|
||||
gtk_widget_set_focusable (widget, TRUE);
|
||||
gtk_widget_set_valign (widget, GTK_ALIGN_START);
|
||||
|
||||
flowbox = GTK_FLOW_BOX (widget);
|
||||
|
@ -1365,7 +1362,7 @@ constructed (GObject *object)
|
|||
GtkAdjustment *hadjustment;
|
||||
GtkAdjustment *vadjustment;
|
||||
GActionGroup *view_action_group;
|
||||
GtkGesture *longpress_gesture;
|
||||
GtkEventController *controller;
|
||||
|
||||
content_widget = nautilus_files_view_get_content_widget (NAUTILUS_FILES_VIEW (self));
|
||||
hadjustment = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (content_widget));
|
||||
|
@ -1391,26 +1388,23 @@ constructed (GObject *object)
|
|||
self->view_icon = g_themed_icon_new ("view-grid-symbolic");
|
||||
|
||||
/* Compensating for the lack of event boxen to allow clicks outside the flow box. */
|
||||
self->multi_press_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (content_widget));
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (self->multi_press_gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (self->multi_press_gesture),
|
||||
0);
|
||||
g_signal_connect (self->multi_press_gesture, "pressed",
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
gtk_widget_add_controller (GTK_WIDGET (content_widget), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (on_button_press_event), self);
|
||||
g_signal_connect (self->multi_press_gesture, "stopped",
|
||||
g_signal_connect (controller, "stopped",
|
||||
G_CALLBACK (on_click_stopped), self);
|
||||
g_signal_connect (self->multi_press_gesture, "released",
|
||||
g_signal_connect (controller, "released",
|
||||
G_CALLBACK (on_click_released), self);
|
||||
|
||||
longpress_gesture = gtk_gesture_long_press_new (GTK_WIDGET (self->view_ui));
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (longpress_gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (longpress_gesture),
|
||||
TRUE);
|
||||
g_signal_connect (longpress_gesture, "pressed",
|
||||
(GCallback) on_longpress_gesture_pressed_callback,
|
||||
self);
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_long_press_new ());
|
||||
gtk_widget_add_controller (GTK_WIDGET (self->view_ui), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (controller), TRUE);
|
||||
g_signal_connect (controller, "pressed",
|
||||
(GCallback) on_longpress_gesture_pressed_callback, self);
|
||||
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (content_widget),
|
||||
GTK_WIDGET (self->view_ui));
|
||||
|
@ -1421,7 +1415,7 @@ constructed (GObject *object)
|
|||
G_N_ELEMENTS (view_icon_actions),
|
||||
self);
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (self));
|
||||
gtk_widget_show (GTK_WIDGET (self));
|
||||
|
||||
view_action_group = nautilus_files_view_get_action_group (NAUTILUS_FILES_VIEW (self));
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (view_action_group),
|
||||
|
|
|
@ -33,7 +33,7 @@ static void
|
|||
update_icon (NautilusViewIconItemUi *self)
|
||||
{
|
||||
NautilusFileIconFlags flags;
|
||||
g_autoptr (GdkPixbuf) icon_pixbuf = NULL;
|
||||
g_autoptr (GdkPaintable) icon_paintable = NULL;
|
||||
GtkStyleContext *style_context;
|
||||
NautilusFile *file;
|
||||
guint icon_size;
|
||||
|
@ -46,8 +46,8 @@ update_icon (NautilusViewIconItemUi *self)
|
|||
NAUTILUS_FILE_ICON_FLAGS_USE_EMBLEMS |
|
||||
NAUTILUS_FILE_ICON_FLAGS_USE_ONE_EMBLEM;
|
||||
|
||||
icon_pixbuf = nautilus_file_get_icon_pixbuf (file, icon_size, 1, flags);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (self->icon), icon_pixbuf);
|
||||
icon_paintable = nautilus_file_get_icon_paintable (file, icon_size, 1, flags);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (self->icon), icon_paintable);
|
||||
|
||||
gtk_widget_set_size_request (self->fixed_height_box, icon_size, icon_size);
|
||||
if (icon_size < NAUTILUS_GRID_ICON_SIZE_LARGEST)
|
||||
|
|
|
@ -83,14 +83,14 @@ static void
|
|||
switch_location (NautilusDragSlotProxyInfo *drag_info)
|
||||
{
|
||||
GFile *location;
|
||||
GtkWidget *window;
|
||||
GtkRoot *window;
|
||||
|
||||
if (drag_info->target_file == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
window = gtk_widget_get_toplevel (drag_info->widget);
|
||||
window = gtk_widget_get_root (drag_info->widget);
|
||||
g_assert (NAUTILUS_IS_WINDOW (window));
|
||||
|
||||
location = nautilus_file_get_location (drag_info->target_file);
|
||||
|
@ -153,7 +153,7 @@ slot_proxy_drag_motion (GtkWidget *widget,
|
|||
{
|
||||
NautilusDragSlotProxyInfo *drag_info;
|
||||
NautilusWindowSlot *target_slot;
|
||||
GtkWidget *window;
|
||||
GtkRoot *window;
|
||||
GdkAtom target;
|
||||
int action;
|
||||
char *target_uri;
|
||||
|
@ -172,7 +172,7 @@ slot_proxy_drag_motion (GtkWidget *widget,
|
|||
goto out;
|
||||
}
|
||||
|
||||
window = gtk_widget_get_toplevel (widget);
|
||||
window = gtk_widget_get_root (widget);
|
||||
g_assert (NAUTILUS_IS_WINDOW (window));
|
||||
|
||||
if (!drag_info->have_data)
|
||||
|
@ -360,7 +360,7 @@ slot_proxy_handle_drop (GtkWidget *widget,
|
|||
unsigned int time,
|
||||
NautilusDragSlotProxyInfo *drag_info)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkRoot *window;
|
||||
NautilusWindowSlot *target_slot;
|
||||
NautilusFilesView *target_view;
|
||||
char *target_uri;
|
||||
|
@ -375,7 +375,7 @@ slot_proxy_handle_drop (GtkWidget *widget,
|
|||
return;
|
||||
}
|
||||
|
||||
window = gtk_widget_get_toplevel (widget);
|
||||
window = gtk_widget_get_root (widget);
|
||||
g_assert (NAUTILUS_IS_WINDOW (window));
|
||||
|
||||
if (drag_info->target_slot != NULL)
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#include <nautilus-extension.h>
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include <eel/eel-vfs-extensions.h>
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -1863,13 +1862,13 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
|
|||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (window));
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Since this is a window, destroying it will also unref it. */
|
||||
gtk_widget_destroy (GTK_WIDGET (window));
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2945,25 +2944,26 @@ nautilus_window_slot_finalize (GObject *object)
|
|||
G_OBJECT_CLASS (nautilus_window_slot_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
nautilus_window_slot_grab_focus (GtkWidget *widget)
|
||||
{
|
||||
NautilusWindowSlot *self;
|
||||
self = NAUTILUS_WINDOW_SLOT (widget);
|
||||
GTK_WIDGET_CLASS (nautilus_window_slot_parent_class)->grab_focus (widget);
|
||||
|
||||
if (nautilus_window_slot_get_search_visible (self))
|
||||
{
|
||||
gtk_widget_grab_focus (GTK_WIDGET (self->query_editor));
|
||||
return gtk_widget_grab_focus (GTK_WIDGET (self->query_editor));
|
||||
}
|
||||
else if (self->content_view)
|
||||
else if (self->content_view != NULL)
|
||||
{
|
||||
gtk_widget_grab_focus (GTK_WIDGET (self->content_view));
|
||||
return gtk_widget_grab_focus (GTK_WIDGET (self->content_view));
|
||||
}
|
||||
else if (self->new_content_view)
|
||||
else if (self->new_content_view != NULL)
|
||||
{
|
||||
gtk_widget_grab_focus (GTK_WIDGET (self->new_content_view));
|
||||
return gtk_widget_grab_focus (GTK_WIDGET (self->new_content_view));
|
||||
}
|
||||
|
||||
return GTK_WIDGET_CLASS (nautilus_window_slot_parent_class)->grab_focus (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -36,17 +36,17 @@
|
|||
#include <sys/time.h>
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
#include <gdk/gdkwayland.h>
|
||||
#include <gdk/wayland/gdkwayland.h>
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/x11/gdkx.h>
|
||||
#endif
|
||||
|
||||
#define DEBUG_FLAG NAUTILUS_DEBUG_WINDOW
|
||||
#include "nautilus-debug.h"
|
||||
|
||||
#include "gtk/nautilusgtkplacessidebar.h"
|
||||
#include "gtk/nautilusgtkplacessidebarprivate.h"
|
||||
|
||||
#include "nautilus-application.h"
|
||||
#include "nautilus-bookmark-list.h"
|
||||
|
@ -70,7 +70,6 @@
|
|||
#include "nautilus-trash-monitor.h"
|
||||
#include "nautilus-ui-utilities.h"
|
||||
#include "nautilus-window-slot.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
/* Forward and back buttons on the mouse */
|
||||
static gboolean mouse_extra_buttons = TRUE;
|
||||
|
@ -99,7 +98,7 @@ static void nautilus_window_back_or_forward (NautilusWindow *window,
|
|||
|
||||
struct _NautilusWindow
|
||||
{
|
||||
HdyApplicationWindow parent_instance;
|
||||
AdwApplicationWindow parent_instance;
|
||||
|
||||
GtkWidget *notebook;
|
||||
|
||||
|
@ -151,13 +150,6 @@ struct _NautilusWindow
|
|||
GMenuModel *tab_menu_model;
|
||||
|
||||
GQueue *tab_data_queue;
|
||||
|
||||
GtkPadController *pad_controller;
|
||||
|
||||
GtkGesture *multi_press_gesture;
|
||||
GtkGesture *notebook_multi_press_gesture;
|
||||
GtkEventController *key_capture_controller;
|
||||
GtkEventController *key_bubble_controller;
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -169,7 +161,7 @@ enum
|
|||
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
G_DEFINE_TYPE (NautilusWindow, nautilus_window, HDY_TYPE_APPLICATION_WINDOW);
|
||||
G_DEFINE_TYPE (NautilusWindow, nautilus_window, ADW_TYPE_APPLICATION_WINDOW);
|
||||
|
||||
static const GtkPadActionEntry pad_actions[] =
|
||||
{
|
||||
|
@ -640,19 +632,19 @@ remember_focus_widget (NautilusWindow *window)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
nautilus_window_grab_focus (GtkWidget *widget)
|
||||
{
|
||||
NautilusWindowSlot *slot;
|
||||
|
||||
slot = nautilus_window_get_active_slot (NAUTILUS_WINDOW (widget));
|
||||
|
||||
GTK_WIDGET_CLASS (nautilus_window_parent_class)->grab_focus (widget);
|
||||
|
||||
if (slot)
|
||||
if (slot != NULL)
|
||||
{
|
||||
gtk_widget_grab_focus (GTK_WIDGET (slot));
|
||||
return gtk_widget_grab_focus (GTK_WIDGET (slot));
|
||||
}
|
||||
|
||||
return GTK_WIDGET_CLASS (nautilus_window_parent_class)->grab_focus (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -756,16 +748,11 @@ update_cursor (NautilusWindow *window)
|
|||
if (slot != NULL &&
|
||||
nautilus_window_slot_get_allow_stop (slot))
|
||||
{
|
||||
GdkDisplay *display;
|
||||
g_autoptr (GdkCursor) cursor = NULL;
|
||||
|
||||
display = gtk_widget_get_display (GTK_WIDGET (window));
|
||||
cursor = gdk_cursor_new_from_name (display, "progress");
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor);
|
||||
gtk_widget_set_cursor_from_name (GTK_WIDGET (window), "progress");
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
|
||||
gtk_widget_set_cursor (GTK_WIDGET (window), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1201,8 +1188,8 @@ get_window_xid (NautilusWindow *window)
|
|||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
|
||||
{
|
||||
GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
return (guint) gdk_x11_window_get_xid (gdk_window);
|
||||
GdkSurface *gdk_surface = gtk_native_get_surface (GTK_NATIVE (window));
|
||||
return (guint) gdk_x11_surface_get_xid (gdk_surface);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -1246,6 +1233,7 @@ add_menu_separator (GtkWidget *menu)
|
|||
gtk_widget_show (separator);
|
||||
}
|
||||
|
||||
#if 0 && SIDEBAR_MENU_ITEMS_NEEDS_GTK4_REIMPLEMENTATION
|
||||
static void
|
||||
places_sidebar_populate_popup_cb (NautilusGtkPlacesSidebar *sidebar,
|
||||
GtkWidget *menu,
|
||||
|
@ -1318,6 +1306,7 @@ places_sidebar_populate_popup_cb (NautilusGtkPlacesSidebar *sidebar,
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
nautilus_window_set_up_sidebar (NautilusWindow *window)
|
||||
|
@ -1345,8 +1334,10 @@ nautilus_window_set_up_sidebar (NautilusWindow *window)
|
|||
g_signal_connect (window->places_sidebar, "drag-perform-drop",
|
||||
G_CALLBACK (places_sidebar_drag_perform_drop_cb), window);
|
||||
#endif
|
||||
#if 0 && SIDEBAR_MENU_ITEMS_NEEDS_GTK4_REIMPLEMENTATION
|
||||
g_signal_connect (window->places_sidebar, "populate-popup",
|
||||
G_CALLBACK (places_sidebar_populate_popup_cb), window);
|
||||
#endif
|
||||
g_signal_connect (window->places_sidebar, "unmount",
|
||||
G_CALLBACK (places_sidebar_unmount_operation_cb), window);
|
||||
}
|
||||
|
@ -1775,18 +1766,18 @@ notebook_popup_menu_show (NautilusWindow *window,
|
|||
}
|
||||
|
||||
static void
|
||||
notebook_button_press_cb (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
notebook_button_press_cb (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
{
|
||||
NautilusWindow *window;
|
||||
GtkNotebook *notebook;
|
||||
gint tab_clicked;
|
||||
guint button;
|
||||
GdkEventSequence *sequence;
|
||||
const GdkEvent *event;
|
||||
GdkEvent *event;
|
||||
GdkModifierType state;
|
||||
|
||||
if (n_press != 1)
|
||||
|
@ -1805,7 +1796,7 @@ notebook_button_press_cb (GtkGestureMultiPress *gesture,
|
|||
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
||||
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
|
||||
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
|
||||
gdk_event_get_state (event, &state);
|
||||
state = gdk_event_get_modifier_state (event);
|
||||
|
||||
if (button == GDK_BUTTON_SECONDARY &&
|
||||
(state & gtk_accelerator_get_default_mod_mask ()) == 0)
|
||||
|
@ -1940,6 +1931,8 @@ notebook_create_window_cb (GtkNotebook *notebook,
|
|||
static void
|
||||
setup_notebook (NautilusWindow *window)
|
||||
{
|
||||
GtkEventController *controller;
|
||||
|
||||
g_signal_connect (window->notebook, "switch-page",
|
||||
G_CALLBACK (notebook_switch_page_cb),
|
||||
window);
|
||||
|
@ -1953,9 +1946,12 @@ setup_notebook (NautilusWindow *window)
|
|||
G_CALLBACK (notebook_page_removed_cb),
|
||||
window);
|
||||
|
||||
g_signal_connect (window->notebook_multi_press_gesture, "pressed",
|
||||
G_CALLBACK (notebook_button_press_cb),
|
||||
window);
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
gtk_widget_add_controller (GTK_WIDGET (window->notebook), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (notebook_button_press_cb), window);
|
||||
}
|
||||
|
||||
const GActionEntry win_entries[] =
|
||||
|
@ -2140,6 +2136,8 @@ nautilus_window_dispose (GObject *object)
|
|||
|
||||
DEBUG ("Destroying window");
|
||||
|
||||
g_clear_pointer (&window->tab_menu, gtk_widget_unparent);
|
||||
|
||||
/* close all slots safely */
|
||||
slots_copy = g_list_copy (window->slots);
|
||||
if (window->active_slot != NULL)
|
||||
|
@ -2166,11 +2164,6 @@ nautilus_window_dispose (GObject *object)
|
|||
|
||||
nautilus_window_unexport_handle (window);
|
||||
|
||||
g_clear_object (&window->notebook_multi_press_gesture);
|
||||
|
||||
g_clear_object (&window->key_capture_controller);
|
||||
g_clear_object (&window->key_bubble_controller);
|
||||
|
||||
G_OBJECT_CLASS (nautilus_window_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
@ -2208,8 +2201,6 @@ nautilus_window_finalize (GObject *object)
|
|||
|
||||
g_queue_free_full (window->tab_data_queue, free_navigation_state);
|
||||
|
||||
g_object_unref (window->pad_controller);
|
||||
|
||||
/* nautilus_window_close() should have run */
|
||||
g_assert (window->slots == NULL);
|
||||
|
||||
|
@ -2219,29 +2210,11 @@ nautilus_window_finalize (GObject *object)
|
|||
static void
|
||||
nautilus_window_save_geometry (NautilusWindow *window)
|
||||
{
|
||||
GdkWindow *gdk_window;
|
||||
GdkWindowState window_state;
|
||||
gint width;
|
||||
gint height;
|
||||
GVariant *initial_size;
|
||||
|
||||
g_assert (NAUTILUS_IS_WINDOW (window));
|
||||
|
||||
gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
if (!gdk_window)
|
||||
{
|
||||
return;
|
||||
}
|
||||
window_state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (window)));
|
||||
if (window_state & (GDK_WINDOW_STATE_TILED | GDK_WINDOW_STATE_MAXIMIZED))
|
||||
{
|
||||
/* Don't save the window state for tiled or maximized windows. In GTK
|
||||
* gtk_window_get_default_size() is going to do this for us.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_window_get_size (GTK_WINDOW (window), &width, &height);
|
||||
gtk_window_get_default_size (GTK_WINDOW (window), &width, &height);
|
||||
initial_size = g_variant_new_parsed ("(%i, %i)", width, height);
|
||||
|
||||
g_settings_set_value (nautilus_window_state,
|
||||
|
@ -2257,7 +2230,7 @@ nautilus_window_close (NautilusWindow *window)
|
|||
nautilus_window_save_geometry (window);
|
||||
nautilus_window_set_active_slot (window, NULL);
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (window));
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2382,9 +2355,9 @@ typedef struct
|
|||
} WaylandWindowHandleExportedData;
|
||||
|
||||
static void
|
||||
wayland_window_handle_exported (GdkWindow *window,
|
||||
const char *wayland_handle_str,
|
||||
gpointer user_data)
|
||||
wayland_window_handle_exported (GdkToplevel *toplevel,
|
||||
const char *wayland_handle_str,
|
||||
gpointer user_data)
|
||||
{
|
||||
WaylandWindowHandleExportedData *data = user_data;
|
||||
|
||||
|
@ -2418,7 +2391,7 @@ nautilus_window_export_handle (NautilusWindow *window,
|
|||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
|
||||
{
|
||||
GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
GdkSurface *gdk_surface = gtk_native_get_surface (GTK_NATIVE (window));
|
||||
WaylandWindowHandleExportedData *data;
|
||||
|
||||
data = g_new0 (WaylandWindowHandleExportedData, 1);
|
||||
|
@ -2426,10 +2399,10 @@ nautilus_window_export_handle (NautilusWindow *window,
|
|||
data->callback = callback;
|
||||
data->user_data = user_data;
|
||||
|
||||
if (!gdk_wayland_window_export_handle (gdk_window,
|
||||
wayland_window_handle_exported,
|
||||
data,
|
||||
g_free))
|
||||
if (!gdk_wayland_toplevel_export_handle (GDK_WAYLAND_TOPLEVEL (gdk_surface),
|
||||
wayland_window_handle_exported,
|
||||
data,
|
||||
g_free))
|
||||
{
|
||||
g_free (data);
|
||||
return FALSE;
|
||||
|
@ -2457,10 +2430,10 @@ nautilus_window_unexport_handle (NautilusWindow *window)
|
|||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
|
||||
{
|
||||
GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
|
||||
if (gdk_window != NULL)
|
||||
GdkSurface *gdk_surface = gtk_native_get_surface (GTK_NATIVE (window));
|
||||
if (GDK_IS_WAYLAND_TOPLEVEL (gdk_surface))
|
||||
{
|
||||
gdk_wayland_window_unexport_handle (gdk_window);
|
||||
gdk_wayland_toplevel_unexport_handle (GDK_WAYLAND_TOPLEVEL (gdk_surface));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -2511,10 +2484,9 @@ on_is_maximized_changed (GObject *object,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
nautilus_window_delete_event (GtkWidget *widget,
|
||||
GdkEventAny *event)
|
||||
nautilus_window_close_request (GtkWindow *window)
|
||||
{
|
||||
nautilus_window_close (NAUTILUS_WINDOW (widget));
|
||||
nautilus_window_close (NAUTILUS_WINDOW (window));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2534,11 +2506,11 @@ nautilus_window_back_or_forward (NautilusWindow *window,
|
|||
}
|
||||
|
||||
static void
|
||||
on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
on_click_gesture_pressed (GtkGestureClick *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
NautilusWindow *window;
|
||||
|
@ -2600,6 +2572,8 @@ static void
|
|||
nautilus_window_init (NautilusWindow *window)
|
||||
{
|
||||
GtkWindowGroup *window_group;
|
||||
GtkPadController *pad_controller;
|
||||
GtkEventController *controller;
|
||||
|
||||
g_type_ensure (NAUTILUS_TYPE_TOOLBAR);
|
||||
gtk_widget_init_template (GTK_WIDGET (window));
|
||||
|
@ -2609,7 +2583,6 @@ nautilus_window_init (NautilusWindow *window)
|
|||
g_object_set (window->places_sidebar,
|
||||
"vexpand", TRUE,
|
||||
"visible", TRUE,
|
||||
"populate-all", TRUE,
|
||||
"show-other-locations", TRUE,
|
||||
"show-starred-location", TRUE,
|
||||
NULL);
|
||||
|
@ -2626,9 +2599,9 @@ nautilus_window_init (NautilusWindow *window)
|
|||
window,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
gtk_popover_bind_model (GTK_POPOVER (window->tab_menu),
|
||||
window->tab_menu_model,
|
||||
NULL);
|
||||
gtk_widget_set_parent (window->tab_menu, GTK_WIDGET (window));
|
||||
gtk_popover_menu_set_menu_model (GTK_POPOVER_MENU (window->tab_menu),
|
||||
G_MENU_MODEL (window->tab_menu_model));
|
||||
|
||||
g_signal_connect (window, "notify::is-maximized",
|
||||
G_CALLBACK (on_is_maximized_changed), NULL);
|
||||
|
@ -2650,41 +2623,30 @@ nautilus_window_init (NautilusWindow *window)
|
|||
|
||||
window->tab_data_queue = g_queue_new ();
|
||||
|
||||
window->pad_controller = gtk_pad_controller_new (GTK_WINDOW (window),
|
||||
G_ACTION_GROUP (window),
|
||||
NULL);
|
||||
gtk_pad_controller_set_action_entries (window->pad_controller,
|
||||
pad_controller = gtk_pad_controller_new (G_ACTION_GROUP (window), NULL);
|
||||
gtk_pad_controller_set_action_entries (pad_controller,
|
||||
pad_actions, G_N_ELEMENTS (pad_actions));
|
||||
gtk_widget_add_controller (GTK_WIDGET (window),
|
||||
GTK_EVENT_CONTROLLER (pad_controller));
|
||||
|
||||
window->multi_press_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (window));
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
gtk_widget_add_controller (GTK_WIDGET (window), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
|
||||
g_signal_connect (controller, "pressed",
|
||||
G_CALLBACK (on_click_gesture_pressed), NULL);
|
||||
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (window->multi_press_gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (window->multi_press_gesture), 0);
|
||||
controller = gtk_event_controller_key_new ();
|
||||
gtk_widget_add_controller (GTK_WIDGET (window), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
|
||||
g_signal_connect (controller, "key-pressed",
|
||||
G_CALLBACK (nautilus_window_key_capture), NULL);
|
||||
|
||||
g_signal_connect (window->multi_press_gesture, "pressed",
|
||||
G_CALLBACK (on_multi_press_gesture_pressed), NULL);
|
||||
|
||||
window->notebook_multi_press_gesture = gtk_gesture_multi_press_new (window->notebook);
|
||||
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (window->notebook_multi_press_gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (window->notebook_multi_press_gesture),
|
||||
0);
|
||||
|
||||
window->key_capture_controller = gtk_event_controller_key_new (GTK_WIDGET (window));
|
||||
gtk_event_controller_set_propagation_phase (window->key_capture_controller,
|
||||
GTK_PHASE_CAPTURE);
|
||||
g_signal_connect (window->key_capture_controller,
|
||||
"key-pressed", G_CALLBACK (nautilus_window_key_capture),
|
||||
NULL);
|
||||
|
||||
window->key_bubble_controller = gtk_event_controller_key_new (GTK_WIDGET (window));
|
||||
gtk_event_controller_set_propagation_phase (window->key_bubble_controller,
|
||||
GTK_PHASE_BUBBLE);
|
||||
g_signal_connect (window->key_bubble_controller,
|
||||
"key-pressed", G_CALLBACK (nautilus_window_key_bubble),
|
||||
NULL);
|
||||
controller = gtk_event_controller_key_new ();
|
||||
gtk_widget_add_controller (GTK_WIDGET (window), controller);
|
||||
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_BUBBLE);
|
||||
g_signal_connect (controller, "key-pressed",
|
||||
G_CALLBACK (nautilus_window_key_bubble), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2692,6 +2654,7 @@ nautilus_window_class_init (NautilusWindowClass *class)
|
|||
{
|
||||
GObjectClass *oclass = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *wclass = GTK_WIDGET_CLASS (class);
|
||||
GtkWindowClass *winclass = GTK_WINDOW_CLASS (class);
|
||||
|
||||
oclass->dispose = nautilus_window_dispose;
|
||||
oclass->finalize = nautilus_window_finalize;
|
||||
|
@ -2699,9 +2662,10 @@ nautilus_window_class_init (NautilusWindowClass *class)
|
|||
|
||||
wclass->show = nautilus_window_show;
|
||||
wclass->realize = nautilus_window_realize;
|
||||
wclass->delete_event = nautilus_window_delete_event;
|
||||
wclass->grab_focus = nautilus_window_grab_focus;
|
||||
|
||||
winclass->close_request = nautilus_window_close_request;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (wclass,
|
||||
"/org/gnome/nautilus/ui/nautilus-window.ui");
|
||||
gtk_widget_class_bind_template_child (wclass, NautilusWindow, toolbar);
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <libhandy-1/handy.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
#include "nautilus-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define NAUTILUS_TYPE_WINDOW (nautilus_window_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (NautilusWindow, nautilus_window, NAUTILUS, WINDOW, HdyApplicationWindow);
|
||||
G_DECLARE_FINAL_TYPE (NautilusWindow, nautilus_window, NAUTILUS, WINDOW, AdwApplicationWindow);
|
||||
|
||||
typedef gboolean (* NautilusWindowGoToCallback) (NautilusWindow *window,
|
||||
GFile *location,
|
||||
|
|
|
@ -30,11 +30,10 @@
|
|||
#include "nautilus-icon-info.h"
|
||||
#include "nautilus-file-utilities.h"
|
||||
#include "nautilus-program-choosing.h"
|
||||
#include "nautilus-gtk4-helpers.h"
|
||||
|
||||
struct _NautilusXContentBar
|
||||
{
|
||||
GtkBin parent_instance;
|
||||
AdwBin parent_instance;
|
||||
GtkWidget *label;
|
||||
|
||||
char **x_content_types;
|
||||
|
@ -79,7 +78,7 @@ content_bar_response_cb (GtkInfoBar *infobar,
|
|||
if (default_app != NULL)
|
||||
{
|
||||
nautilus_launch_application_for_mount (default_app, bar->mount,
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (bar))));
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (bar))));
|
||||
g_object_unref (default_app);
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +181,7 @@ nautilus_x_content_bar_set_x_content_types (NautilusXContentBar *bar,
|
|||
icon = g_app_info_get_icon (default_app);
|
||||
if (icon != NULL)
|
||||
{
|
||||
image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_gicon (icon);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -190,7 +189,7 @@ nautilus_x_content_bar_set_x_content_types (NautilusXContentBar *bar,
|
|||
}
|
||||
|
||||
name = g_app_info_get_name (default_app);
|
||||
info_bar = gtk_bin_get_child (GTK_BIN (bar));
|
||||
info_bar = adw_bin_get_child (ADW_BIN (bar));
|
||||
button = gtk_info_bar_add_button (GTK_INFO_BAR (info_bar), name, n);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
|
||||
|
|
|
@ -24,12 +24,13 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gio/gio.h>
|
||||
#include <libadwaita-1/adwaita.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define NAUTILUS_TYPE_X_CONTENT_BAR (nautilus_x_content_bar_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (NautilusXContentBar, nautilus_x_content_bar, NAUTILUS, X_CONTENT_BAR, GtkBin)
|
||||
G_DECLARE_FINAL_TYPE (NautilusXContentBar, nautilus_x_content_bar, NAUTILUS, X_CONTENT_BAR, AdwBin)
|
||||
|
||||
GtkWidget *nautilus_x_content_bar_new (GMount *mount,
|
||||
const char * const *x_content_types);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<menu id="add_tag_menu">
|
||||
<section>
|
||||
<attribute name="label" translatable="yes">Automatic Numbers</attribute>
|
||||
|
@ -91,26 +92,21 @@
|
|||
</section>
|
||||
</menu>
|
||||
<template class="NautilusBatchRenameDialog" parent="GtkDialog">
|
||||
<property name="resizable">True</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="height-request">563</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<signal name="response" handler="batch_rename_dialog_on_response"/>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="focusable">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="rename_button">
|
||||
<property name="label" translatable="yes">_Rename</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
|
@ -120,19 +116,16 @@
|
|||
<action-widget response="ok" default="true">rename_button</action-widget>
|
||||
<action-widget response="cancel">cancel_button</action-widget>
|
||||
</action-widgets>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="vbox">
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="content_area">
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">15</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin-top">20</property>
|
||||
|
@ -140,304 +133,263 @@
|
|||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="format_mode_button">
|
||||
<object class="GtkCheckButton" id="format_mode_button">
|
||||
<property name="label" translatable="yes">Rename _using a template</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="toggled" handler="batch_rename_dialog_mode_changed" swapped="yes" />
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="replace_mode_button">
|
||||
<object class="GtkCheckButton" id="replace_mode_button">
|
||||
<property name="label" translatable="yes">Find and replace _text</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="group">format_mode_button</property>
|
||||
<signal name="toggled" handler="batch_rename_dialog_mode_changed" swapped="yes" />
|
||||
<signal name="toggled" handler="batch_rename_dialog_mode_changed" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">3</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="mode_stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="vhomogeneous">False</property>
|
||||
<property name="hhomogeneous">True</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<property name="transition_duration">100</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="format_stack_child">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-start">40</property>
|
||||
<property name="margin-end">40</property>
|
||||
<property name="margin-top">0</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="row-spacing">15</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">format</property>
|
||||
<property name="title" translatable="yes" comments="Translators: This is a noun, not a verb">Format</property>
|
||||
<property name="child">
|
||||
<object class="GtkGrid" id="format_stack_child">
|
||||
<property name="margin-start">40</property>
|
||||
<property name="margin-end">40</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="row-spacing">15</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="width_request">400</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="activates-default">True</property>
|
||||
<signal name="activate" handler="file_names_widget_on_activate" swapped="yes" />
|
||||
<signal name="insert-text" handler="on_insert_text" swapped="no" />
|
||||
<signal name="delete-text" handler="on_delete_text" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="menu_model">add_tag_menu</property>
|
||||
<object class="GtkBox">
|
||||
<property name="halign">center</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Add</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="width">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="numbering_revealer">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="numbering_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="numbering_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Automatic Numbering Order</property>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="focusable">True</property>
|
||||
<property name="width_request">400</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="activates-default">True</property>
|
||||
<signal name="activate" handler="file_names_widget_on_activate" swapped="yes"/>
|
||||
<signal name="insert-text" handler="on_insert_text" swapped="no"/>
|
||||
<signal name="delete-text" handler="on_delete_text" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="menu-model">numbering_order_menu</property>
|
||||
<property name="menu_model">add_tag_menu</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">15</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="numbering_order_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="width-request">180</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Original Name (Ascending)</property>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="action_icon">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">pan-down-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Add</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
<property name="column-span">5</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="numbering_revealer">
|
||||
<property name="halign">center</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="numbering_box">
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="numbering_label">
|
||||
<property name="label" translatable="yes">Automatic Numbering Order</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="menu-model">numbering_order_menu</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">15</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="numbering_order_label">
|
||||
<property name="width-request">180</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Original Name (Ascending)</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="action_icon">
|
||||
<property name="icon-name">pan-down-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
<property name="column-span">5</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="width">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">format</property>
|
||||
<property name="title" translatable="yes" comments="Translators: This is a noun, not a verb">Format</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="replace_stack_child">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-start">40</property>
|
||||
<property name="margin-end">40</property>
|
||||
<property name="margin-top">0</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="row-spacing">15</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="existing_text_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Existing Text</property>
|
||||
<property name="sensitive">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="find_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="width_request">375</property>
|
||||
<property name="activates-default">True</property>
|
||||
<signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes" />
|
||||
<signal name="activate" handler="file_names_widget_on_activate" swapped="yes" />
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="width">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="replace_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Replace With</property>
|
||||
<property name="sensitive">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="replace_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="width_request">375</property>
|
||||
<signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes" />
|
||||
<signal name="activate" handler="file_names_widget_on_activate" swapped="yes" />
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="width">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">replace</property>
|
||||
<property name="title" translatable="yes" context="title">Replace</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkGrid" id="replace_stack_child">
|
||||
<property name="margin-start">40</property>
|
||||
<property name="margin-end">40</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="row-spacing">15</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="existing_text_label">
|
||||
<property name="label" translatable="yes">Existing Text</property>
|
||||
<property name="sensitive">False</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="find_entry">
|
||||
<property name="focusable">True</property>
|
||||
<property name="width_request">375</property>
|
||||
<property name="activates-default">True</property>
|
||||
<signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes"/>
|
||||
<signal name="activate" handler="file_names_widget_on_activate" swapped="yes"/>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
<property name="column-span">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="replace_label">
|
||||
<property name="label" translatable="yes">Replace With</property>
|
||||
<property name="sensitive">False</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="replace_entry">
|
||||
<property name="focusable">True</property>
|
||||
<property name="width_request">375</property>
|
||||
<signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes"/>
|
||||
<signal name="activate" handler="file_names_widget_on_activate" swapped="yes"/>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">1</property>
|
||||
<property name="column-span">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
<property name="column-span">8</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="width">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolled_window">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="max-content-height">250</property>
|
||||
<property name="min-content-height">250</property>
|
||||
<property name="max-content-width">600</property>
|
||||
<property name="min-content-width">600</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="a_box">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="original_name_listbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">GTK_SELECTION_NONE</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="arrow_listbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">GTK_SELECTION_NONE</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="result_listbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">GTK_SELECTION_NONE</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
<property name="column-span">8</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="conflict_box">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="visible">False</property>
|
||||
<property name="margin-start">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="conflict_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="conflict_down">
|
||||
<property name="visible">True</property>
|
||||
<signal name="clicked" handler="select_next_conflict_down" swapped="yes" />
|
||||
<signal name="clicked" handler="select_next_conflict_down" swapped="yes"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">go-down-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
|
@ -449,11 +401,9 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="conflict_up">
|
||||
<property name="visible">True</property>
|
||||
<signal name="clicked" handler="select_next_conflict_up" swapped="yes" />
|
||||
<signal name="clicked" handler="select_next_conflict_up" swapped="yes"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">go-up-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
|
@ -464,16 +414,13 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">3</property>
|
||||
<property name="column-span">8</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -481,7 +428,6 @@
|
|||
</child>
|
||||
</template>
|
||||
<object class="GtkImage" id="done_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">object-select-symbolic</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkListStore" id="store">
|
||||
<columns>
|
||||
<!-- column-name COLUMN_VISIBLE -->
|
||||
|
@ -15,16 +14,12 @@
|
|||
</columns>
|
||||
</object>
|
||||
<template class="NautilusColumnChooser" parent="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkTreeView" id="view">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="model">store</property>
|
||||
<property name="headers-visible">False</property>
|
||||
|
@ -60,7 +55,7 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
<style>
|
||||
<class name="frame"/>
|
||||
</style>
|
||||
|
@ -68,19 +63,15 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="move_up_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<signal name="clicked" handler="move_up_clicked_callback" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">go-up-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -88,13 +79,11 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="move_down_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<signal name="clicked" handler="move_down_clicked_callback" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">go-down-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -107,12 +96,10 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="use_default_button">
|
||||
<property name="label" translatable="yes">Reset to De_fault</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Replace the current List Columns settings with the default settings</property>
|
||||
<property name="use-underline">True</property>
|
||||
<signal name="clicked" handler="use_default_clicked_callback" swapped="no"/>
|
||||
|
|
|
@ -1,25 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkPopover" id="extension_popover">
|
||||
<property name="position">bottom</property>
|
||||
<property name="constrain-to">none</property>
|
||||
<child>
|
||||
<object class="HdyPreferencesGroup">
|
||||
<object class="AdwPreferencesGroup">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">12</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="zip_row">
|
||||
<object class="AdwActionRow" id="zip_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="no">.zip</property>
|
||||
<property name="subtitle" translatable="yes">Compatible with all operating systems.</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="zip_checkmark">
|
||||
<property name="visible">True</property>
|
||||
<property name="width-request">16</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
|
@ -28,7 +25,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="encrypted_zip_row">
|
||||
<object class="AdwActionRow" id="encrypted_zip_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="no">.zip</property>
|
||||
|
@ -38,7 +35,6 @@
|
|||
</style>
|
||||
<child>
|
||||
<object class="GtkImage" id="encrypted_zip_checkmark">
|
||||
<property name="visible">True</property>
|
||||
<property name="width-request">16</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
|
@ -47,14 +43,13 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="tar_xz_row">
|
||||
<object class="AdwActionRow" id="tar_xz_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="no">.tar.xz</property>
|
||||
<property name="subtitle" translatable="yes">Smaller archives but Linux and Mac only.</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="tar_xz_checkmark">
|
||||
<property name="visible">True</property>
|
||||
<property name="width-request">16</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
|
@ -63,14 +58,13 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="seven_zip_row">
|
||||
<object class="AdwActionRow" id="seven_zip_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="no">.7z</property>
|
||||
<property name="subtitle" translatable="yes">Smaller archives but must be installed on Windows and Mac.</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="seven_zip_checkmark">
|
||||
<property name="visible">True</property>
|
||||
<property name="width-request">16</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
|
@ -85,14 +79,12 @@
|
|||
<property name="title" translatable="yes">Create Archive</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<property name="default-width">500</property>
|
||||
<property name="default-height">210</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="vbox">
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="content_area">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin-top">30</property>
|
||||
<property name="margin-bottom">30</property>
|
||||
|
@ -104,21 +96,18 @@
|
|||
<child>
|
||||
<object class="GtkLabel" id="name_label">
|
||||
<property name="label" translatable="yes">Archive name</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="width-chars">30</property>
|
||||
</object>
|
||||
|
@ -128,7 +117,6 @@
|
|||
<property name="popover">extension_popover</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="extension_stack">
|
||||
|
@ -175,18 +163,18 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="error_revealer">
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkLabel" id="error_label">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="passphrase_label">
|
||||
<property name="visible">False</property>
|
||||
<property name="label" translatable="yes">Password</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="xalign">0</property>
|
||||
|
@ -194,6 +182,7 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="passphrase_entry">
|
||||
<property name="visible">False</property>
|
||||
<property name="placeholder-text" translatable="yes">Enter a password here.</property>
|
||||
<property name="input-purpose">password</property>
|
||||
<property name="visibility">False</property>
|
||||
|
@ -205,17 +194,14 @@
|
|||
<child type="action">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="activate_button">
|
||||
<property name="label" translatable="yes">Create</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
</object>
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkDialog" id="create_folder_dialog">
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<property name="width_request">450</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="vbox">
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="content_area">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin_top">18</property>
|
||||
<property name="margin_bottom">12</property>
|
||||
|
@ -19,26 +17,23 @@
|
|||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="error_revealer">
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkLabel" id="error_label">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -46,16 +41,13 @@
|
|||
<child type="action">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="yes">Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="ok_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
</object>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<template class="NautilusFileConflictDialog" parent="GtkDialog">
|
||||
<property name="modal">True</property>
|
||||
<property name="resizable">False</property>
|
||||
<child internal-child="vbox">
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">18</property>
|
||||
<property name="margin-bottom">18</property>
|
||||
<property name="margin-start">18</property>
|
||||
|
@ -14,12 +13,10 @@
|
|||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="primary_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
|
@ -32,7 +29,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="secondary_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
|
@ -42,58 +38,44 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="dest_image">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="dest_image"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="dest_label">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<object class="GtkLabel" id="dest_label"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="src_image">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="src_image"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="src_label">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<object class="GtkLabel" id="src_label"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkExpander" id="expander">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Select a new name for the destination</property>
|
||||
<property name="use-underline">True</property>
|
||||
<signal name="notify::expanded" handler="on_expanded_notify"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">6</property>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<signal name="changed" handler="entry_text_changed_cb"/>
|
||||
|
@ -101,7 +83,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Reset</property>
|
||||
<property name="use-underline">True</property>
|
||||
<signal name="clicked" handler="reset_button_clicked_cb"/>
|
||||
|
@ -115,11 +96,9 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbox">
|
||||
<property name="visible">True</property>
|
||||
<signal name="toggled" handler="checkbox_toggled_cb"/>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Apply this action to all files and folders</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
|
@ -132,7 +111,6 @@
|
|||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
|
@ -140,22 +118,18 @@
|
|||
<child type="action">
|
||||
<object class="GtkButton" id="rename_button">
|
||||
<property name="visible">False</property>
|
||||
<property name="can-default">True</property>
|
||||
<property name="label" translatable="yes">Re_name</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="replace_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-default">True</property>
|
||||
<property name="label" translatable="yes">Re_place</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="skip_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Skip</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkDialog" id="change_permissions_dialog">
|
||||
<property name="title" translatable="yes">Change Permissions for Enclosed Files</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="cancel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="change">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">C_hange</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<style>
|
||||
|
@ -29,7 +26,6 @@
|
|||
</style>
|
||||
<child>
|
||||
<object class="GtkGrid" id="change_permissions_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
|
@ -40,125 +36,114 @@
|
|||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Files</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Folders</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Owner</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="file_owner_combo">
|
||||
<property name="visible">True</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="folder_owner_combo">
|
||||
<property name="visible">True</property>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Group</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="file_group_combo">
|
||||
<property name="visible">True</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="folder_group_combo">
|
||||
<property name="visible">True</property>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="file_other_combo">
|
||||
<property name="visible">True</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="folder_other_combo">
|
||||
<property name="visible">True</property>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Others</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<menu id="background-menu">
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">New _Folder</attribute>
|
||||
|
@ -31,8 +32,7 @@
|
|||
<attribute name="action">view.select-all</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section id="background-extensions-section">
|
||||
</section>
|
||||
<section id="background-extensions-section"/>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">P_roperties</attribute>
|
||||
|
@ -42,8 +42,7 @@
|
|||
</section>
|
||||
</menu>
|
||||
<menu id="selection-menu">
|
||||
<section id="new-folder-with-selection-section">
|
||||
</section>
|
||||
<section id="new-folder-with-selection-section"/>
|
||||
<section id="open-with-application-section">
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Open With Other _Application</attribute>
|
||||
|
@ -55,7 +54,7 @@
|
|||
<attribute name="label" translatable="yes">_Scripts</attribute>
|
||||
<attribute name="action">view.scripts</attribute>
|
||||
<attribute name="hidden-when">action-disabled</attribute>
|
||||
<section id="scripts-submenu-section" />
|
||||
<section id="scripts-submenu-section"/>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Open Scripts Folder</attribute>
|
||||
|
@ -217,8 +216,7 @@
|
|||
<attribute name="hidden-when">action-disabled</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section id="selection-extensions-section">
|
||||
</section>
|
||||
<section id="selection-extensions-section"/>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Tags</attribute>
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkDialog" id="select_items_dialog">
|
||||
<property name="title" translatable="yes">Select Items Matching</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="cancel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="select">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Select</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="can-default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="margin-top">18</property>
|
||||
<property name="margin-bottom">18</property>
|
||||
|
@ -29,25 +26,22 @@
|
|||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Pattern</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="pattern_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="activates_default">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="example">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">start</property>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkGrid" id="folder_is_empty">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
|
@ -11,31 +10,29 @@
|
|||
<property name="visible">False</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixel_size">128</property>
|
||||
<property name="icon_name">folder-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
<class name="nautilus-empty-state-icon"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Folder is Empty</property>
|
||||
<style>
|
||||
<class name="large-title"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -1,25 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<object class="HdyWindow" id="window">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="AdwWindow" id="window">
|
||||
<property name="modal">True</property>
|
||||
<property name="type-hint">dialog</property>
|
||||
<property name="default-width">300</property>
|
||||
<property name="default-height">400</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="HdyHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" bind-source="window" bind-property="title" bind-flags="sync-create"/>
|
||||
<property name="show-close-button">True</property>
|
||||
</object>
|
||||
<object class="AdwHeaderBar"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">12</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
<property name="margin-start">12</property>
|
||||
|
@ -29,7 +22,6 @@
|
|||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Choose the order of information to appear in this folder:</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="wrap">True</property>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkGrid" id="no_search_results">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
|
@ -11,44 +10,41 @@
|
|||
<property name="visible">False</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixel_size">80</property>
|
||||
<property name="icon_name">edit-find-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">No Results Found</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.4399999999999999"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
<attribute name="scale" value="1.44"></attribute>
|
||||
</attributes>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Try a different search</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
|
|
|
@ -1,28 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkDialog" id="request_passphrase_dialog">
|
||||
<property name="title" translatable="yes">Password Required</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="destroy-with-parent">True</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<child internal-child="vbox">
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
<property name="max-width-chars">60</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="vexpand">True</property>
|
||||
|
@ -35,15 +32,12 @@
|
|||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="extract_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-default">True</property>
|
||||
<property name="label" translatable="yes">Extract</property>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<menu id="button-menu">
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Open in New _Window</attribute>
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="HdyPreferencesWindow" id="preferences_window">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="AdwPreferencesWindow" id="preferences_window">
|
||||
<property name="search_enabled">False</property>
|
||||
<child>
|
||||
<object class="HdyPreferencesPage">
|
||||
<object class="AdwPreferencesPage">
|
||||
<property name="title" translatable="yes">General</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="HdyPreferencesGroup">
|
||||
<object class="AdwPreferencesGroup">
|
||||
<property name="title" translatable="yes">General</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="HdyActionRow">
|
||||
<object class="AdwActionRow">
|
||||
<property name="activatable_widget">sort_folders_first_switch</property>
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">Sort _Folders Before Files</property>
|
||||
|
@ -23,13 +22,12 @@
|
|||
<child>
|
||||
<object class="GtkSwitch" id="sort_folders_first_switch">
|
||||
<property name="valign">center</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyActionRow">
|
||||
<object class="AdwActionRow">
|
||||
<property name="activatable_widget">use_tree_view_switch</property>
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">_Expandable Folders in List View</property>
|
||||
|
@ -39,13 +37,12 @@
|
|||
<child>
|
||||
<object class="GtkSwitch" id="use_tree_view_switch">
|
||||
<property name="valign">center</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="open_action_row">
|
||||
<object class="AdwComboRow" id="open_action_row">
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">Action to Open Items</property>
|
||||
<property name="title_lines">0</property>
|
||||
|
@ -56,12 +53,12 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyPreferencesGroup">
|
||||
<object class="AdwPreferencesGroup">
|
||||
<property name="title" translatable="yes">Optional Context Menu Actions</property>
|
||||
<property name="description" translatable="yes">Show more actions in the menus. Keyboard shortcuts can be used even if the actions are not shown.</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="HdyActionRow">
|
||||
<object class="AdwActionRow">
|
||||
<property name="activatable_widget">show_create_link_switch</property>
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">Create _Link</property>
|
||||
|
@ -71,13 +68,12 @@
|
|||
<child>
|
||||
<object class="GtkSwitch" id="show_create_link_switch">
|
||||
<property name="valign">center</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyActionRow">
|
||||
<object class="AdwActionRow">
|
||||
<property name="activatable_widget">show_delete_permanently_switch</property>
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">_Delete Permanently</property>
|
||||
|
@ -87,7 +83,6 @@
|
|||
<child>
|
||||
<object class="GtkSwitch" id="show_delete_permanently_switch">
|
||||
<property name="valign">center</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -95,12 +90,12 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyPreferencesGroup">
|
||||
<object class="AdwPreferencesGroup">
|
||||
<property name="title" translatable="yes">Performance</property>
|
||||
<property name="description" translatable="yes">These features may cause slowdowns and excess network usage, especially when browsing files outside this computer, such as on a remote server.</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="search_recursive_row">
|
||||
<object class="AdwComboRow" id="search_recursive_row">
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">Search in Subfolders</property>
|
||||
<property name="title_lines">0</property>
|
||||
|
@ -109,7 +104,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="thumbnails_row">
|
||||
<object class="AdwComboRow" id="thumbnails_row">
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">Show Thumbnails</property>
|
||||
<property name="title_lines">0</property>
|
||||
|
@ -118,7 +113,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="count_row">
|
||||
<object class="AdwComboRow" id="count_row">
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes">Count Number of Files in Folders</property>
|
||||
<property name="title_lines">0</property>
|
||||
|
@ -129,12 +124,12 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyPreferencesGroup">
|
||||
<object class="AdwPreferencesGroup">
|
||||
<property name="description" translatable="yes">Add information to be displayed beneath file and folder names. More information will appear when zooming closer.</property>
|
||||
<property name="title" translatable="yes">Icon View Captions</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="captions_0_comborow">
|
||||
<object class="AdwComboRow" id="captions_0_comborow">
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes" context="the n-th position of an icon caption" comments="Translators: This is an ordinal number">First</property>
|
||||
<property name="title_lines">0</property>
|
||||
|
@ -143,7 +138,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="captions_1_comborow">
|
||||
<object class="AdwComboRow" id="captions_1_comborow">
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes" context="the n-th position of an icon caption" comments="Translators: This is an ordinal number">Second</property>
|
||||
<property name="title_lines">0</property>
|
||||
|
@ -152,7 +147,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyComboRow" id="captions_2_comborow">
|
||||
<object class="AdwComboRow" id="captions_2_comborow">
|
||||
<property name="subtitle_lines">0</property>
|
||||
<property name="title" translatable="yes" context="the n-th position of an icon caption" comments="Translators: This is an ordinal number">Third</property>
|
||||
<property name="title_lines">0</property>
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkImage" id="cancel_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">window-close-symbolic</property>
|
||||
</object>
|
||||
<template class="NautilusProgressInfoWidget" parent="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
|
@ -16,37 +12,34 @@
|
|||
<child>
|
||||
<object class="GtkLabel" id="status">
|
||||
<property name="width_request">300</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label">status</property>
|
||||
<property name="ellipsize">middle</property>
|
||||
<property name="max_width_chars">40</property>
|
||||
<property name="xalign">0</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkProgressBar" id="progress_bar">
|
||||
<property name="visible">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_start">2</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="pulse_step">0.050000000000000003</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_start">20</property>
|
||||
|
@ -59,16 +52,15 @@
|
|||
<property name="icon-name">window-close-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
<property name="row-span">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="height">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="details">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">label</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="wrap_mode">word-char</property>
|
||||
|
@ -78,13 +70,13 @@
|
|||
<class name="dim-label"/>
|
||||
</style>
|
||||
<attributes>
|
||||
<attribute name="font-features" value="tnum"/>
|
||||
<attribute name="font-features" value="tnum"></attribute>
|
||||
</attributes>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,12 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkPopover" id="rename_file_popover">
|
||||
<property name="position">bottom</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-start">18</property>
|
||||
<property name="margin-end">18</property>
|
||||
<property name="margin-top">18</property>
|
||||
|
@ -14,7 +11,6 @@
|
|||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
<style>
|
||||
<class name="title-2"/>
|
||||
|
@ -23,32 +19,27 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="can-default">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="error_revealer">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkLabel" id="error_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
<property name="max-width-chars">0</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="rename_button">
|
||||
<property name="label" translatable="yes">_Rename</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="use-underline">True</property>
|
||||
<style>
|
||||
|
@ -57,6 +48,6 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<template class="NautilusSearchPopover" parent="GtkPopover">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid" >
|
||||
<property name="visible">True</property>
|
||||
<property name="child">
|
||||
<object class="GtkGrid">
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
|
@ -15,296 +12,272 @@
|
|||
<property name="column_spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="when_dim_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">When</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="date_stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<property name="transition_duration">250</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="select_date_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select a date</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="select_date_button_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Select Dates…</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<signal name="clicked" handler="select_date_button_clicked" object="NautilusSearchPopover" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="clear_date_button">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Clear the currently selected date</property>
|
||||
<signal name="clicked" handler="clear_date_button_clicked" object="NautilusSearchPopover" swapped="no" />
|
||||
<child>
|
||||
<object class="GtkImage" id="clear_date_button_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">edit-clear-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">date-button</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkButton" id="select_date_button">
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select a date</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="select_date_button_label">
|
||||
<property name="label" translatable="yes">Select Dates…</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<signal name="clicked" handler="select_date_button_clicked" object="NautilusSearchPopover" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="clear_date_button">
|
||||
<property name="visible">False</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Clear the currently selected date</property>
|
||||
<signal name="clicked" handler="clear_date_button_clicked" object="NautilusSearchPopover" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage" id="clear_date_button_image">
|
||||
<property name="icon_name">edit-clear-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="date_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="secondary_icon_name">x-office-calendar-symbolic</property>
|
||||
<property name="secondary_icon_tooltip_text" translatable="yes">Show a calendar to select the date</property>
|
||||
<signal name="icon-release" handler="toggle_calendar_icon_clicked" object="NautilusSearchPopover" swapped="no" />
|
||||
<signal name="activate" handler="date_entry_activate" object="NautilusSearchPopover" swapped="no" />
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">date-entry</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkEntry" id="date_entry">
|
||||
<property name="focusable">True</property>
|
||||
<property name="secondary_icon_name">x-office-calendar-symbolic</property>
|
||||
<property name="secondary_icon_tooltip_text" translatable="yes">Show a calendar to select the date</property>
|
||||
<signal name="icon-release" handler="toggle_calendar_icon_clicked" object="NautilusSearchPopover" swapped="no"/>
|
||||
<signal name="activate" handler="date_entry_activate" object="NautilusSearchPopover" swapped="no"/>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="around_revealer">
|
||||
<property name="transition_type">slide-down</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="row_spacing">8</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="around_dim_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin_top">10</property>
|
||||
<property name="label" translatable="yes">Since…</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="around_stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="vhomogeneous">False</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<property name="transition_duration">250</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="height_request">200</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="dates_listbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<signal name="row-activated" handler="dates_listbox_row_activated" object="NautilusSearchPopover" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">date-list</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="height_request">200</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="child">
|
||||
<object class="GtkViewport">
|
||||
<property name="child">
|
||||
<object class="GtkListBox" id="dates_listbox">
|
||||
<property name="selection_mode">none</property>
|
||||
<signal name="row-activated" handler="dates_listbox_row_activated" object="NautilusSearchPopover" swapped="no"/>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCalendar" id="calendar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="show_week_numbers">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">date-calendar</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkCalendar" id="calendar">
|
||||
<property name="focusable">True</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="show_week_numbers">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="last_modified_button">
|
||||
<object class="GtkCheckButton" id="last_modified_button">
|
||||
<property name="label" translatable="yes">Last _modified</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="search_time_type_changed" object="NautilusSearchPopover" swapped="no" />
|
||||
<signal name="toggled" handler="search_time_type_changed" object="NautilusSearchPopover" swapped="no"/>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="last_used_button">
|
||||
<object class="GtkCheckButton" id="last_used_button">
|
||||
<property name="label" translatable="yes">Last _used</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">last_modified_button</property>
|
||||
<signal name="toggled" handler="search_time_type_changed" object="NautilusSearchPopover" swapped="no" />
|
||||
<signal name="toggled" handler="search_time_type_changed" object="NautilusSearchPopover" swapped="no"/>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="created_button">
|
||||
<property name="label" translatable="yes">Created</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<property name="group">last_modified_button</property>
|
||||
<signal name="toggled" handler="search_time_type_changed" object="NautilusSearchPopover" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="created_button">
|
||||
<property name="label" translatable="yes">Created</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="group">last_modified_button</property>
|
||||
<signal name="toggled" handler="search_time_type_changed" object="NautilusSearchPopover" swapped="no"/>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">4</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="what_dim_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin_top">10</property>
|
||||
<property name="label" translatable="yes">What</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">3</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="type_stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="vhomogeneous">False</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<property name="transition_duration">250</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="select_type_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Which file types will be searched</property>
|
||||
<signal name="clicked" handler="select_type_button_clicked" object="NautilusSearchPopover" swapped="no" />
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">type-button</property>
|
||||
<property name="child">
|
||||
<object class="GtkButton" id="select_type_button">
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Which file types will be searched</property>
|
||||
<signal name="clicked" handler="select_type_button_clicked" object="NautilusSearchPopover" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="type_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Anything</property>
|
||||
<property name="width_chars">30</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">pan-down-symbolic</property>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel" id="type_label">
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Anything</property>
|
||||
<property name="width_chars">30</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">pan-down-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">type-button</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="height_request">250</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="type_listbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">single</property>
|
||||
<signal name="row-activated" handler="types_listbox_row_activated" object="NautilusSearchPopover" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">type-list</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="height_request">250</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="child">
|
||||
<object class="GtkViewport">
|
||||
<property name="child">
|
||||
<object class="GtkListBox" id="type_listbox">
|
||||
<signal name="row-activated" handler="types_listbox_row_activated" object="NautilusSearchPopover" swapped="no"/>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">4</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="search_dim_label">
|
||||
|
@ -314,54 +287,47 @@
|
|||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">5</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">True</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="full_text_search_button">
|
||||
<object class="GtkToggleButton" id="full_text_search_button">
|
||||
<property name="label" translatable="yes">Full Text</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Search on the file content and name</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<signal name="toggled" handler="search_fts_mode_changed" object="NautilusSearchPopover" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="filename_search_button">
|
||||
<object class="GtkToggleButton" id="filename_search_button">
|
||||
<property name="label" translatable="yes">File Name</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Search only on the file name</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="group">full_text_search_button</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="toggled" handler="search_fts_mode_changed" object="NautilusSearchPopover" swapped="no" />
|
||||
<signal name="toggled" handler="search_fts_mode_changed" object="NautilusSearchPopover" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">6</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</template>
|
||||
<object class="GtkSizeGroup">
|
||||
<property name="mode">vertical</property>
|
||||
|
@ -373,7 +339,6 @@
|
|||
</widgets>
|
||||
</object>
|
||||
<object class="GtkSizeGroup">
|
||||
<property name="mode">horizontal</property>
|
||||
<widgets>
|
||||
<widget name="search_dim_label"/>
|
||||
<widget name="when_dim_label"/>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkGrid" id="starred_is_empty">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
|
@ -11,31 +10,29 @@
|
|||
<property name="visible">False</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixel_size">128</property>
|
||||
<property name="icon_name">starred-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
<class name="nautilus-empty-state-icon"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Starred files will appear here</property>
|
||||
<style>
|
||||
<class name="large-title"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<menu id="zoom_section">
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Zoom out</attribute>
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkPopover" id="back_menu">
|
||||
<property name="position">bottom</property>
|
||||
<property name="relative-to">back_button</property>
|
||||
</object>
|
||||
<object class="GtkPopover" id="forward_menu">
|
||||
<property name="position">bottom</property>
|
||||
<property name="relative-to">forward_button</property>
|
||||
</object>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkPopoverMenu" id="back_menu"/>
|
||||
<object class="GtkPopoverMenu" id="forward_menu"/>
|
||||
<menu id="view_menu">
|
||||
<section>
|
||||
<attribute name="display-hint">horizontal-buttons</attribute>
|
||||
|
@ -109,16 +102,13 @@
|
|||
</section>
|
||||
</menu>
|
||||
<object class="GtkPopover" id="operations_popover">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="max_content_height">270</property>
|
||||
<property name="propagate_natural_height">True</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkListBox" id="operations_list">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
|
@ -129,68 +119,66 @@
|
|||
<class name="operations-list"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
<signal name="notify::visible" handler="on_operations_popover_notify_visible" object="NautilusToolbar" swapped="yes"/>
|
||||
</object>
|
||||
<template class="NautilusToolbar" parent="GtkBin">
|
||||
<property name="visible">True</property>
|
||||
<template class="NautilusToolbar" parent="AdwBin">
|
||||
<child>
|
||||
<object class="HdyHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<object class="AdwHeaderBar">
|
||||
<property name="focusable">False</property>
|
||||
<child type="title">
|
||||
<object class="GtkBox" id="header_toolbar">
|
||||
<property name="width_request">270</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="toolbar_switcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="path_bar_container">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">pathbar</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="path_bar_container">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="location_entry_container">
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">location</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="location_entry_container">
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="search_container">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">search</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="search_container">
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="search_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Search</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="action_name">slot.search-visible</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="search_icon">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">edit-find-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
|
@ -202,20 +190,17 @@
|
|||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="start">
|
||||
<object class="GtkBox" id="navigation_box">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="back_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Go back</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="action_name">win.back</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="back_icon">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-previous-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
|
@ -227,15 +212,13 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="forward_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Go forward</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="action_name">win.forward</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="forward_icon">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
|
@ -251,19 +234,17 @@
|
|||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<child type="end">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin_start">72</property>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="operations_revealer">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="transition_type">slide-right</property>
|
||||
<child>
|
||||
<property name="child">
|
||||
<object class="GtkMenuButton" id="operations_button">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Show operations</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="popover">operations_popover</property>
|
||||
|
@ -271,34 +252,29 @@
|
|||
<object class="GtkDrawingArea" id="operations_icon">
|
||||
<property name="width_request">16</property>
|
||||
<property name="height_request">16</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<signal name="draw" handler="on_operations_icon_draw" object="NautilusToolbar" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="button"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_end">6</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="view_toggle_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Toggle view</property>
|
||||
<property name="action_name">slot.files-view-mode-toggle</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="view_toggle_icon">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -309,16 +285,13 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="view_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes" comments="“View” is a noun">View options</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="action_name">win.view-menu</property>
|
||||
<property name="menu-model">view_menu</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">pan-down-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -334,14 +307,12 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="app_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="focusable">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="menu-model">app_menu</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">open-menu-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
|
@ -352,9 +323,6 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkGrid" id="trash_is_empty">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
|
@ -11,31 +10,29 @@
|
|||
<property name="visible">False</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixel_size">128</property>
|
||||
<property name="icon_name">user-trash-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
<class name="nautilus-empty-state-icon"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Trash is Empty</property>
|
||||
<style>
|
||||
<class name="large-title"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue