Files
binary-repo/x11/libs/libfm/libfm-fixes.patch
T
2023-03-14 14:28:40 +00:00

10606 lines
479 KiB
Diff

diff --git a/NEWS b/NEWS
index 79d6082c..cbdfd8b1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+Changes on 1.4.0 since 1.3.2:
+
+* Migrated away from dbus-glib-1 which is deprecated for years.
+
+* Migrated from Udisks (which is not used anymore anywhere) to Udisks2 DBus API.
+
+
Changes on 1.3.2 since 1.3.1:
* Fixed all/allfiles parse conditions in FmAction, it was inverted.
diff --git a/ar-lib b/ar-lib
new file mode 100755
index 00000000..c349042c
--- /dev/null
+++ b/ar-lib
@@ -0,0 +1,271 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2019-07-04.01; # UTC
+
+# Copyright (C) 2010-2021 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN* | MSYS*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin | msys)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try '$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ q*) quick=yes ;;
+ r*) replace=yes ;;
+ s*) index=yes ;;
+ S*) ;; # the index is always updated implicitly
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ v*) ;; # TODO: don't ignore the verbose modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+ yes,* | ,yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
+ | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$quick$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/configure.ac b/configure.ac
index bf6b07fd..6a61c963 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ AM_COND_IF(EXTRALIB_ONLY,
[enable_actions=no])
if test x"$enable_actions" = xyes; then
dnl no vala compiler required when sources are from dist tarball
- if test -f src/actions/libfmactions_la_vala.stamp; then
+ if test -f $srcdir/src/actions/libfmactions_la_vala.stamp; then
AM_PROG_VALAC
else
AM_PROG_VALAC([0.13.0])
@@ -89,11 +89,11 @@ IT_PROG_INTLTOOL([0.40.0])
dnl libgtk version
AC_ARG_WITH(gtk,
[AC_HELP_STRING([--with-gtk=VER],
- [choose Gtk+ version for libfm-gtk build (default=2)])
+ [choose Gtk+ version for libfm-gtk build (default=3)])
AC_HELP_STRING([--without-gtk],
[disable libfm-gtk build])],
[ac_with_gtk="${withval}"],
- [ac_with_gtk=2]
+ [ac_with_gtk=3]
)
AM_COND_IF(EXTRALIB_ONLY,
[ac_with_gtk=no])
@@ -112,13 +112,13 @@ AC_SUBST(GIO_LIBS)
if test x"$ac_with_gtk" != xno; then
case "$ac_with_gtk" in
- 3|3.*)
+ *)
pkg_modules="$gio_modules gtk+-3.0 pango >= 1.16.0 cairo >= 1.8.0"
LIBFM_GTK_LTLIBRARIES=libfm-gtk3.la
LIBFM_GTK_PC=libfm-gtk3.pc
ac_with_gtk="3.0"
;;
- *)
+ 2|2.*)
pkg_modules="$gio_modules gtk+-2.0 >= 2.18.0 pango >= 1.16.0 cairo >= 1.8.0"
LIBFM_GTK_LTLIBRARIES=libfm-gtk.la
LIBFM_GTK_PC=libfm-gtk.pc
@@ -184,7 +184,7 @@ fi
AC_ARG_ENABLE(udisks,
[AC_HELP_STRING([--enable-udisks],
- [build libfm with udisks support (Linux only) @<:@default=yes@:>@])],
+ [build libfm with udisks support (Linux only) @<:@default=no@:>@])],
[enable_udisks="${enableval}"],
[enable_udisks=no]
)
@@ -194,12 +194,6 @@ AM_CONDITIONAL(ENABLE_UDISKS, test x"$enable_udisks" = x"yes")
if test x"$enable_udisks" = x"yes"; then
# turn on udisks support
AC_DEFINE_UNQUOTED(USE_UDISKS, [1], [Enable UDisks support])
-
- # test for availability of dbus
- dbus_modules="dbus-glib-1"
- PKG_CHECK_MODULES(DBUS, [$dbus_modules])
- AC_SUBST(DBUS_CFLAGS)
- AC_SUBST(DBUS_LIBS)
fi
AC_ARG_ENABLE([exif],
diff --git a/data/ui/app-chooser.glade b/data/ui/app-chooser.glade
index 7ac95f7b..9a373937 100644
--- a/data/ui/app-chooser.glade
+++ b/data/ui/app-chooser.glade
@@ -1,36 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<interface>
- <requires lib="gtk+" version="2.18"/>
- <!-- interface-naming-policy toplevel-contextual -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkImage" id="browse_btn_img">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="stock">gtk-open</property>
</object>
<object class="GtkDialog" id="dlg">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">5</property>
<property name="title" translatable="yes">Choose Application</property>
- <property name="default_width">400</property>
- <property name="default_height">380</property>
- <property name="type_hint">dialog</property>
+ <property name="default-width">400</property>
+ <property name="default-height">380</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox">
+ <object class="GtkBox" id="dialog-vbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton">
+ <property name="label">gtk-cancel</property>
+ <property name="use-action-appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton">
+ <property name="label">gtk-ok</property>
+ <property name="use-action-appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack-type">end</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
<child>
<object class="GtkHBox" id="file_type_hbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="file_type_header">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="xpad">2</property>
<property name="ypad">2</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -40,7 +87,7 @@
</child>
<child>
<object class="GtkLabel" id="file_type">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -58,14 +105,12 @@
<child>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<child>
<object class="GtkScrolledWindow" id="apps_scroll">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">in</property>
<child>
<placeholder/>
</child>
@@ -74,30 +119,30 @@
<child type="tab">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Use selected application to open files</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Use selected application to open files</property>
<property name="label" translatable="yes">_Installed Applications</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;C_ommand line to execute:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">cmdline</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">cmdline</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -108,28 +153,26 @@
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkEntry" id="cmdline">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="activates_default">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">●</property>
+ <property name="activates-default">True</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
<property name="expand">True</property>
@@ -140,12 +183,12 @@
<child>
<object class="GtkButton" id="browse_btn">
<property name="label" translatable="yes">_Browse...</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="image">browse_btn_img</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<signal name="clicked" handler="on_browse_btn_clicked" object="app_chooser_dlg" swapped="yes"/>
</object>
<packing>
@@ -164,12 +207,12 @@
<child>
<object class="GtkCheckButton" id="use_terminal">
<property name="label" translatable="yes">_Execute in terminal emulator</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -180,18 +223,18 @@
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkCheckButton" id="keep_open">
<property name="label" translatable="yes">_Keep terminal window open after command execution</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
</child>
</object>
@@ -204,15 +247,15 @@
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;These special codes can be used in the command line:&lt;/b&gt;
&lt;b&gt;%f&lt;/b&gt;: Represents a single file name
&lt;b&gt;%F&lt;/b&gt;: Represents multiple file names
&lt;b&gt;%u&lt;/b&gt;: Represents a single URI of the file
&lt;b&gt;%U&lt;/b&gt;: Represents multiple URIs</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -232,12 +275,12 @@
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;_Application name (optional, set it to keep association)&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">app_name</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">app_name</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -248,18 +291,16 @@
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkEntry" id="app_name">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="activates_default">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">●</property>
+ <property name="activates-default">True</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
</child>
</object>
@@ -277,14 +318,14 @@
<child type="tab">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Execute custom command line to open files</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Execute custom command line to open files</property>
<property name="label" translatable="yes">C_ustom Command Line</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="position">1</property>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
</object>
@@ -294,25 +335,15 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="status">
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
<child>
<object class="GtkCheckButton" id="set_default">
<property name="label" translatable="yes">_Set selected application as default action for this file type</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -320,50 +351,14 @@
<property name="position">2</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="cancelbutton">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="okbutton">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <child>
+ <object class="GtkLabel" id="status">
+ <property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
diff --git a/data/ui/ask-rename.glade b/data/ui/ask-rename.glade
index af65b6c4..e582c1bc 100644
--- a/data/ui/ask-rename.glade
+++ b/data/ui/ask-rename.glade
@@ -1,30 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<interface>
- <requires lib="gtk+" version="2.18"/>
- <!-- interface-naming-policy toplevel-contextual -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dlg">
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">10</property>
<property name="title" translatable="yes">Confirm File Replacing</property>
- <property name="type_hint">normal</property>
+ <property name="type-hint">normal</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox">
+ <object class="GtkBox" id="dialog-vbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area">
+ <object class="GtkButtonBox" id="dialog-action_area">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -35,13 +36,13 @@
<child>
<object class="GtkButton" id="skip">
<property name="label" translatable="yes">_Skip</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -52,13 +53,13 @@
<child>
<object class="GtkButton" id="rename">
<property name="label" translatable="yes">_Rename</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -69,11 +70,11 @@
<child>
<object class="GtkButton" id="overwrite">
<property name="label" translatable="yes">_Overwrite</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -85,22 +86,22 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="yalign">0</property>
<property name="stock">gtk-dialog-question</property>
- <property name="icon-size">6</property>
+ <property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
@@ -111,17 +112,17 @@
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;There is already a file with the same name in this location.&lt;/b&gt;
Do you want to replace the existing file</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -132,14 +133,14 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="dest_icon">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property>
- <property name="icon-size">6</property>
+ <property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
@@ -150,7 +151,7 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkLabel" id="dest_fi">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -169,9 +170,9 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">with the following file?</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -182,14 +183,14 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="src_icon">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property>
- <property name="icon-size">6</property>
+ <property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
@@ -200,7 +201,7 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkLabel" id="src_fi">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -219,16 +220,16 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">_File name:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">filename</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">filename</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -239,13 +240,11 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkEntry" id="filename">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">•</property>
+ <property name="activates-default">True</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
<property name="expand">True</property>
@@ -277,12 +276,12 @@ Do you want to replace the existing file</property>
<child>
<object class="GtkCheckButton" id="apply_all">
<property name="label" translatable="yes">_Apply this option to all existing files</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/data/ui/choose-icon.ui b/data/ui/choose-icon.ui
index 18e822d7..ecfc6a66 100644
--- a/data/ui/choose-icon.ui
+++ b/data/ui/choose-icon.ui
@@ -1,115 +1,106 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<!--*- mode: xml -*-->
<interface>
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dlg">
- <property name="border_width">10</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">10</property>
<property name="title" translatable="yes">Choose An Icon...</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
+ <property name="type-hint">normal</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="cancel">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<object class="GtkButton" id="ok">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="pack-type">end</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkRadioButton" id="theme">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="label" translatable="yes" comments="genitive case is here: Choose icon from: ...">system icon theme</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="files">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="label" translatable="yes" comments="genitive case is here: Choose icon from: ...">image files</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">theme</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -119,58 +110,41 @@
<child type="label">
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
<property name="label" translatable="yes">&lt;b&gt;Choose icon from:&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
+ <property name="use-markup">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
</object>
</child>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
+ <property name="can-focus">False</property>
+ <property name="show-tabs">False</property>
+ <property name="show-border">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+ <property name="can-focus">True</property>
+ <property name="hscrollbar-policy">never</property>
<child>
<object class="GtkIconView" id="icons">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="selection_mode">GTK_SELECTION_SINGLE</property>
- <property name="reorderable">False</property>
+ <property name="can-focus">True</property>
+ <property name="margin">0</property>
</object>
</child>
</object>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
</child>
<child>
<placeholder/>
@@ -178,14 +152,10 @@
<child>
<object class="GtkFileChooserWidget" id="chooser">
<property name="visible">True</property>
- <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
- <property name="local_only">True</property>
- <property name="select_multiple">False</property>
- <property name="show_hidden">False</property>
+ <property name="can-focus">False</property>
</object>
<packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -193,9 +163,9 @@
</child>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
diff --git a/data/ui/file-prop.glade b/data/ui/file-prop.glade
index b24713a2..94bc286a 100644
--- a/data/ui/file-prop.glade
+++ b/data/ui/file-prop.glade
@@ -1,36 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<interface>
- <requires lib="gtk+" version="2.18"/>
- <!-- interface-naming-policy toplevel-contextual -->
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkListStore" id="flags_set_dir_model">
+ <columns>
+ <!-- column-name bit -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">---</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes" context="It is a directory access bit - 'sticky' - where only owner can delete a file from it">Sticky</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Set GID</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Sticky &amp; set GID</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="flags_set_file_model">
+ <columns>
+ <!-- column-name bit -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">---</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes" context="this is a file access mode bit, also known as 'suid'">Set UID</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Set GID</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Set UID &amp; GID</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="read_access_model">
+ <columns>
+ <!-- column-name who -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">---</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes" context="this is a file access mode - only owner can access the file, for others access is denied">Only owner</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Only owner and group</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Anyone</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="user_access_model">
+ <columns>
+ <!-- column-name who -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">---</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Nobody</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes" context="this is a file access mode - only owner can access the file, for others access is denied">Only owner</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Only owner and group</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Anyone</col>
+ </row>
+ </data>
+ </object>
<object class="GtkDialog" id="dlg">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes">File Properties</property>
<property name="resizable">False</property>
- <property name="window_position">center-on-parent</property>
- <property name="default_width">360</property>
- <property name="type_hint">dialog</property>
+ <property name="window-position">center-on-parent</property>
+ <property name="default-width">360</property>
+ <property name="type-hint">dialog</property>
<property name="gravity">center</property>
<signal name="response" handler="on_filePropertiesDlg_response" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog_vbox">
+ <object class="GtkBox" id="dialog_vbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog_action_area">
+ <object class="GtkButtonBox" id="dialog_action_area">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
<signal name="clicked" handler="gtk_widget_destroy" object="filePropertiesDlg" swapped="yes"/>
</object>
<packing>
@@ -42,13 +132,13 @@
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
<signal name="clicked" handler="gtk_widget_destroy" object="filePropertiesDlg" swapped="yes"/>
</object>
<packing>
@@ -61,448 +151,446 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="border_width">6</property>
+ <property name="can-focus">True</property>
+ <property name="border-width">6</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="bottom_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="bottom-padding">6</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkTable" id="general_table">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">4</property>
- <property name="n_rows">12</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">4</property>
+ <property name="n-rows">12</property>
+ <property name="n-columns">3</property>
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkEventBox" id="icon_eventbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkImage" id="icon">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">Icon of the file in folder view</property>
+ <property name="has-tooltip">True</property>
+ <property name="tooltip-text" translatable="yes">Icon of the file in folder view</property>
<property name="stock">gtk-missing-image</property>
- <property name="icon-size">6</property>
+ <property name="icon_size">6</property>
</object>
</child>
</object>
<packing>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- <property name="x_padding">12</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
+ <property name="x-padding">12</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="file_label">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">1</property>
- <property name="use_underline">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="file">
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;_Name:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">name</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">name</property>
+ <property name="xalign">1</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkEntry" id="name">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label20">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Location:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">dir</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">dir</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">2</property>
+ <property name="bottom-attach">3</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="dir">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
<property name="ellipsize">middle</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">2</property>
+ <property name="bottom-attach">3</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="target_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Target file:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">target</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">target</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">3</property>
+ <property name="bottom-attach">4</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="target">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
<property name="ellipsize">middle</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">3</property>
+ <property name="bottom-attach">4</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;File type:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">type</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">type</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">4</property>
+ <property name="bottom-attach">5</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="type">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="wrap">True</property>
<property name="selectable">True</property>
<property name="ellipsize">end</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">4</property>
+ <property name="bottom-attach">5</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="open_with_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Open _with:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">open_with</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">open_with</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">5</property>
+ <property name="bottom-attach">6</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkComboBox" id="open_with">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Select the application used to open files of this type </property>
+ <property name="can-focus">True</property>
+ <property name="tooltip-text" translatable="yes">Select the application used to open files of this type </property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">5</property>
+ <property name="bottom-attach">6</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="total_files_label">
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Total count of files:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">total_files</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">total_files</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">6</property>
+ <property name="bottom-attach">7</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="total_files">
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">6</property>
+ <property name="bottom-attach">7</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="total_size_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Total size of files:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">total_size</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">total_size</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">7</property>
+ <property name="bottom-attach">8</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="total_size">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">7</property>
+ <property name="bottom-attach">8</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="size_on_disk_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Size on disk:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">size_on_disk</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">size_on_disk</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">8</property>
+ <property name="bottom-attach">9</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="size_on_disk">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">8</property>
+ <property name="bottom-attach">9</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="mtime_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Last modification:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">mtime</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">mtime</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">9</property>
+ <property name="bottom-attach">10</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="mtime">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">9</property>
+ <property name="bottom-attach">10</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="atime_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Last access:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">atime</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">atime</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">10</property>
+ <property name="bottom-attach">11</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="atime">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">10</property>
+ <property name="bottom-attach">11</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="ctime_label">
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Last permissions change:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">ctime</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">ctime</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">11</property>
+ <property name="bottom-attach">12</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="ctime">
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">11</property>
- <property name="bottom_attach">12</property>
- <property name="y_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">11</property>
+ <property name="bottom-attach">12</property>
+ <property name="y-options"/>
</packing>
</child>
</object>
@@ -512,99 +600,95 @@
<child type="tab">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">_General</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="permissions_tab">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="bottom_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="bottom-padding">6</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">2</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">4</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">2</property>
+ <property name="n-rows">2</property>
+ <property name="n-columns">2</property>
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">4</property>
<child>
<object class="GtkLabel" id="owner_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;O_wner:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">owner</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">owner</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="group_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;G_roup:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">group</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">group</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkEntry" id="owner">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">•</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="group">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">•</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -617,92 +701,92 @@
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">4</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
+ <property name="n-rows">4</property>
+ <property name="n-columns">2</property>
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">4</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;_View content:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">read_perm</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">read_perm</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;C_hange content:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">write_perm</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">write_perm</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="exec_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;_Execute:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">exec_perm</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">exec_perm</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="top-attach">2</property>
+ <property name="bottom-attach">3</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="flags_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Special bits:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="top-attach">3</property>
+ <property name="bottom-attach">4</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="read_perm">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Who can read content of the file/directory</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Who can read content of the file/directory</property>
<property name="model">read_access_model</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
@@ -712,16 +796,16 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="write_perm">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Who can change content of the file/directory</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Who can change content of the file/directory</property>
<property name="model">user_access_model</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
@@ -731,18 +815,18 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="exec_perm">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Who can execute the file or enter the directory</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Who can execute the file or enter the directory</property>
<property name="model">user_access_model</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext3"/>
@@ -752,18 +836,18 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">2</property>
+ <property name="bottom-attach">3</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="flags_set_file">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Special flags for file execution</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Special flags for file execution</property>
<property name="model">flags_set_file_model</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext4"/>
@@ -773,18 +857,18 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">3</property>
+ <property name="bottom-attach">4</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="flags_set_dir">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Special flags for directory access</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Special flags for directory access</property>
<property name="model">flags_set_dir_model</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
@@ -794,11 +878,11 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">3</property>
+ <property name="bottom-attach">4</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -808,9 +892,9 @@
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Access Control&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
</object>
</child>
</object>
@@ -823,11 +907,11 @@
<child>
<object class="GtkCheckButton" id="hidden">
<property name="label" translatable="yes">Hidden file</property>
+ <property name="use-action-appearance">False</property>
<property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">False</property>
+ <property name="receives-default">False</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -845,21 +929,21 @@
<child type="tab">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">_Permissions</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="position">1</property>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="extra_tab">
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="bottom_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="bottom-padding">6</property>
+ <property name="left-padding">12</property>
<child>
<placeholder/>
</child>
@@ -871,12 +955,12 @@
<child type="tab">
<object class="GtkLabel" id="extra_tab_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">False</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="position">2</property>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
</object>
@@ -893,93 +977,4 @@
<action-widget response="-5">ok</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="flags_set_dir_model">
- <columns>
- <!-- column-name bit -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">---</col>
- </row>
- <row>
- <col id="0" translatable="yes">None</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="It is a directory access bit - 'sticky' - where only owner can delete a file from it">Sticky</col>
- </row>
- <row>
- <col id="0" translatable="yes">Set GID</col>
- </row>
- <row>
- <col id="0" translatable="yes">Sticky &amp; set GID</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="flags_set_file_model">
- <columns>
- <!-- column-name bit -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">---</col>
- </row>
- <row>
- <col id="0" translatable="yes">None</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="this is a file access mode bit, also known as 'suid'">Set UID</col>
- </row>
- <row>
- <col id="0" translatable="yes">Set GID</col>
- </row>
- <row>
- <col id="0" translatable="yes">Set UID &amp; GID</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="read_access_model">
- <columns>
- <!-- column-name who -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">---</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="this is a file access mode - only owner can access the file, for others access is denied">Only owner</col>
- </row>
- <row>
- <col id="0" translatable="yes">Only owner and group</col>
- </row>
- <row>
- <col id="0" translatable="yes">Anyone</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="user_access_model">
- <columns>
- <!-- column-name who -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">---</col>
- </row>
- <row>
- <col id="0" translatable="yes">Nobody</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="this is a file access mode - only owner can access the file, for others access is denied">Only owner</col>
- </row>
- <row>
- <col id="0" translatable="yes">Only owner and group</col>
- </row>
- <row>
- <col id="0" translatable="yes">Anyone</col>
- </row>
- </data>
- </object>
</interface>
diff --git a/data/ui/filesearch.glade b/data/ui/filesearch.glade
index caf9e98b..c3fe367b 100644
--- a/data/ui/filesearch.glade
+++ b/data/ui/filesearch.glade
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<interface>
- <requires lib="gtk+" version="2.18"/>
- <!-- interface-naming-policy project-wide -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="bigger_adjustment">
<property name="upper">2147483647</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
<object class="GtkListStore" id="bigger_liststore">
<columns>
@@ -27,143 +27,88 @@
</row>
</data>
</object>
- <object class="GtkDialog" id="date_dlg">
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="title" translatable="yes">Choose Date</property>
- <property name="type_hint">dialog</property>
- <property name="transient_for">dlg</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="date_dlg_vbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button2">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Choose a date from the following calendar</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCalendar" id="calendar">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">button2</action-widget>
- <action-widget response="-5">button1</action-widget>
- </action-widgets>
+ <object class="GtkListStore" id="path_list_store">
+ <columns>
+ <!-- column-name path -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkAdjustment" id="smaller_adjustment">
+ <property name="upper">2147483647</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
+ </object>
+ <object class="GtkListStore" id="smaller_liststore">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Bytes</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">KB</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">MB</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">GB</col>
+ </row>
+ </data>
</object>
<object class="GtkDialog" id="dlg">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">5</property>
<property name="title" translatable="yes">Search Files</property>
- <property name="default_width">512</property>
- <property name="default_height">384</property>
- <property name="icon_name">edit-find</property>
- <property name="type_hint">dialog</property>
+ <property name="default-width">512</property>
+ <property name="default-height">384</property>
+ <property name="icon-name">edit-find</property>
+ <property name="type-hint">dialog</property>
<signal name="response" handler="on_dlg_response" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="find_button">
<property name="label">gtk-find</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -171,30 +116,30 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="search_dialog_tabs">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="scrollable">True</property>
<child>
<object class="GtkVBox" id="general_settings_container">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;File _Name Patterns:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">name_entry</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">name_entry</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -205,27 +150,24 @@
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
+ <property name="right-padding">12</property>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="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="tooltip_text" translatable="yes">Pattern may be either POSIX shell pattern list (with ',' as separator) or POSIX regular expression.</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="has-focus">True</property>
+ <property name="tooltip-text" translatable="yes">Pattern may be either POSIX shell pattern list (with ',' as separator) or POSIX regular expression.</property>
+ <property name="activates-default">True</property>
<property name="text">*</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -236,14 +178,14 @@
<child>
<object class="GtkCheckButton" id="name_case_insensitive_checkbutton">
<property name="label" translatable="yes">Case insensiti_ve</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="relief">none</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -254,12 +196,12 @@
<child>
<object class="GtkCheckButton" id="name_regex_checkbutton">
<property name="label" translatable="yes">_Use regular expression</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -279,12 +221,12 @@
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Plac_es to Search:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">path_tree_view</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">path_tree_view</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -295,32 +237,33 @@
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
+ <property name="right-padding">12</property>
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="path_settings_container">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-in</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">etched-in</property>
<child>
<object class="GtkTreeView" id="path_tree_view">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="model">path_list_store</property>
- <property name="headers_visible">False</property>
+ <property name="headers-visible">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection"/>
+ </child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="title">path</property>
@@ -344,16 +287,16 @@
<child>
<object class="GtkVBox" id="path_controls">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="add_path_button">
<property name="label">gtk-add</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
<signal name="clicked" handler="on_add_path_button_clicked" swapped="no"/>
</object>
<packing>
@@ -365,11 +308,11 @@
<child>
<object class="GtkButton" id="remove_path_button">
<property name="label">gtk-remove</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
<signal name="clicked" handler="on_remove_path_button_clicked" swapped="no"/>
</object>
<packing>
@@ -395,13 +338,13 @@
<child>
<object class="GtkCheckButton" id="search_recursive_checkbutton">
<property name="label" translatable="yes">_Search in sub directories</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -412,12 +355,12 @@
<child>
<object class="GtkCheckButton" id="search_hidden_files_checkbutton">
<property name="label" translatable="yes">Search _hidden files</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -439,27 +382,27 @@
<child type="tab">
<object class="GtkLabel" id="name_path_tab_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">Name/_Location</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="type_frame_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;File Type&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -470,20 +413,20 @@
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
+ <property name="right-padding">12</property>
<child>
<object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">Only search for files of following types:</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -494,12 +437,12 @@
<child>
<object class="GtkCheckButton" id="text_file_checkbutton">
<property name="label" translatable="yes">Te_xt files</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -510,12 +453,12 @@
<child>
<object class="GtkCheckButton" id="image_file_checkbutton">
<property name="label" translatable="yes">_Image files</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -526,12 +469,12 @@
<child>
<object class="GtkCheckButton" id="audio_file_checkbutton">
<property name="label" translatable="yes">_Audio files</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -542,12 +485,12 @@
<child>
<object class="GtkCheckButton" id="video_file_checkbutton">
<property name="label" translatable="yes">_Video files</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -558,12 +501,12 @@
<child>
<object class="GtkCheckButton" id="doc_file_checkbutton">
<property name="label" translatable="yes">_Documents</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -574,11 +517,11 @@
<child>
<object class="GtkCheckButton" id="dir_file_checkbutton">
<property name="label" translatable="yes">Folde_rs</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-action-appearance">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
@@ -589,16 +532,16 @@
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkCheckButton" id="other_file_checkbutton">
<property name="label" translatable="yes">Ot_her:</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="use-action-appearance">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -608,12 +551,10 @@
</child>
<child>
<object class="GtkEntry" id="other_file_entry">
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Any valid content type can be entered here. Wildcard '*' is allowed at end of the type. Multiple types should be separated with ';'.</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="tooltip-text" translatable="yes">Any valid content type can be entered here. Wildcard '*' is allowed at end of the type. Multiple types should be separated with ';'.</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
<property name="expand">True</property>
@@ -645,30 +586,30 @@
<child type="tab">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">File _Type</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="position">1</property>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="file_contains_settings">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="file_contains_labe">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;File Contain_s:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">content_entry</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">content_entry</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -679,25 +620,22 @@
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
+ <property name="right-padding">12</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkEntry" id="content_entry">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">True</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">•</property>
+ <property name="activates-default">True</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -708,13 +646,13 @@
<child>
<object class="GtkCheckButton" id="content_case_insensitive_checkbutton">
<property name="label" translatable="yes">Case insensiti_ve</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -725,12 +663,12 @@
<child>
<object class="GtkCheckButton" id="content_regex_checkbutton">
<property name="label" translatable="yes">_Use regular expression</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -755,28 +693,28 @@
<child type="tab">
<object class="GtkLabel" id="content_type_tab_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">C_ontent</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="position">2</property>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="file_size_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;File Size&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -787,95 +725,89 @@
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
+ <property name="right-padding">12</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="n-rows">2</property>
+ <property name="n-columns">3</property>
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkSpinButton" id="bigger_spinbutton">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">●</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
<property name="adjustment">bigger_adjustment</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_padding">2</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="x-padding">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="smaller_spinbutton">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">●</property>
+ <property name="primary-icon-activatable">False</property>
+ <property name="secondary-icon-activatable">False</property>
<property name="adjustment">smaller_adjustment</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">2</property>
- <property name="y_padding">2</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-padding">2</property>
+ <property name="y-padding">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="smaller_than_checkbutton">
<property name="label" translatable="yes">_Smaller than:</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<signal name="toggled" handler="on_smaller_than_checkbutton_toggled" swapped="no"/>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="bigger_than_checkbutton">
<property name="label" translatable="yes">_Bigger than:</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<signal name="toggled" handler="on_bigger_than_checkbutton_toggled" swapped="no"/>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
+ <property name="x-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="bigger_unit_combo">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="model">bigger_liststore</property>
<property name="active">1</property>
<child>
@@ -886,16 +818,16 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="x_options"></property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="x-options"/>
</packing>
</child>
<child>
<object class="GtkComboBox" id="smaller_unit_combo">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="model">smaller_liststore</property>
<property name="active">2</property>
<child>
@@ -906,12 +838,12 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options">GTK_EXPAND</property>
+ <property name="left-attach">2</property>
+ <property name="right-attach">3</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options"/>
+ <property name="y-options">GTK_EXPAND</property>
</packing>
</child>
</object>
@@ -926,10 +858,10 @@
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Last Modified Time&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -940,81 +872,81 @@
<child>
<object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
+ <property name="right-padding">12</property>
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="n-rows">2</property>
+ <property name="n-columns">2</property>
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkButton" id="max_mtime_button">
<property name="label" translatable="yes">(None)</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<signal name="clicked" handler="on_max_mtime_button_clicked" swapped="no"/>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="min_mtime_button">
<property name="label" translatable="yes">(None)</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<signal name="clicked" handler="on_min_mtime_button_clicked" swapped="no"/>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="max_mtime_checkbutton">
<property name="label" translatable="yes">_Earlier than:</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<signal name="toggled" handler="on_max_mtime_checkbutton_toggled" swapped="no"/>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="min_mtime_checkbutton">
<property name="label" translatable="yes">L_ater than:</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
<signal name="toggled" handler="on_min_mtime_checkbutton_toggled" swapped="no"/>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -1034,13 +966,13 @@
<child type="tab">
<object class="GtkLabel" id="size_date_tab_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">_Properties</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
<property name="position">3</property>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
</object>
@@ -1053,39 +985,96 @@
</object>
</child>
<action-widgets>
- <action-widget response="-5">find_button</action-widget>
<action-widget response="-6">cancel_button</action-widget>
+ <action-widget response="-5">find_button</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="path_list_store">
- <columns>
- <!-- column-name path -->
- <column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkAdjustment" id="smaller_adjustment">
- <property name="upper">2147483647</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkListStore" id="smaller_liststore">
- <columns>
- <!-- column-name gchararray1 -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Bytes</col>
- </row>
- <row>
- <col id="0" translatable="yes">KB</col>
- </row>
- <row>
- <col id="0" translatable="yes">MB</col>
- </row>
- <row>
- <col id="0" translatable="yes">GB</col>
- </row>
- </data>
+ <object class="GtkDialog" id="date_dlg">
+ <property name="can-focus">False</property>
+ <property name="border-width">12</property>
+ <property name="title" translatable="yes">Choose Date</property>
+ <property name="type-hint">dialog</property>
+ <property name="transient-for">dlg</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="date_dlg_vbox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-cancel</property>
+ <property name="use-action-appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label">gtk-ok</property>
+ <property name="use-action-appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack-type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">Choose a date from the following calendar</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCalendar" id="calendar">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">button2</action-widget>
+ <action-widget response="-5">button1</action-widget>
+ </action-widgets>
</object>
</interface>
diff --git a/data/ui/preferred-apps.glade b/data/ui/preferred-apps.glade
index 327cb63a..aa282470 100644
--- a/data/ui/preferred-apps.glade
+++ b/data/ui/preferred-apps.glade
@@ -1,70 +1,122 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<interface>
- <requires lib="gtk+" version="2.18"/>
- <!-- interface-naming-policy project-wide -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dlg">
- <property name="border_width">5</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">5</property>
<property name="title" translatable="yes">Preferred Applications</property>
- <property name="window_position">center</property>
- <property name="type_hint">normal</property>
+ <property name="window-position">center</property>
+ <property name="type-hint">normal</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack-type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">12</property>
<property name="spacing">18</property>
<child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Web Browser&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label4">
- <property name="width_request">360</property>
+ <property name="width-request">360</property>
<property name="visible">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">The preferred Web Browser will be used to open hyperlinks.</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="browser">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -73,59 +125,70 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Mail Client&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label6">
- <property name="width_request">360</property>
+ <property name="width-request">360</property>
<property name="visible">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">The preferred Mail Client will be used to compose emails when you click on e-mail addresses.</property>
<property name="wrap">True</property>
- <property name="width_chars">60</property>
+ <property name="width-chars">60</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="mail_client">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -134,56 +197,66 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox4">
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Terminal Emulator&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="use-markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">Command line:</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="terminal">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x2022;</property>
+ <property name="can-focus">True</property>
+ <property name="invisible-char">•</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -192,12 +265,14 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@@ -206,15 +281,16 @@
<child type="tab">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">System Applications</property>
</object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox8">
- <property name="orientation">vertical</property>
+ <property name="can-focus">False</property>
<child>
<placeholder/>
</child>
@@ -226,55 +302,19 @@
<child type="tab">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">File Associations</property>
</object>
<packing>
<property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="tab-fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
diff --git a/data/ui/progress.glade b/data/ui/progress.glade
index cae3df04..a12f2d9d 100644
--- a/data/ui/progress.glade
+++ b/data/ui/progress.glade
@@ -1,33 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<interface>
- <requires lib="gtk+" version="2.18"/>
- <!-- interface-naming-policy toplevel-contextual -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dlg">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="default_width">480</property>
- <property name="type_hint">dialog</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">5</property>
+ <property name="default-width">480</property>
+ <property name="type-hint">dialog</property>
<property name="gravity">north-east</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox">
+ <object class="GtkBox" id="dialog-vbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area">
+ <object class="GtkButtonBox" id="dialog-action_area">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-stop</property>
+ <property name="use-action-appearance">False</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-stock">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -39,26 +40,26 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="icon">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="stock">gtk-file</property>
- <property name="icon-size">6</property>
+ <property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
@@ -68,9 +69,9 @@
</child>
<child>
<object class="GtkLabel" id="msg">
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -88,159 +89,159 @@
<child>
<object class="GtkTable" id="table">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
+ <property name="n-rows">5</property>
+ <property name="n-columns">2</property>
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkLabel" id="action">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">src</property>
<property name="xalign">0</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">src</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="src">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="ellipsize">end</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="to_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" comments="To: &lt;Destination folder&gt; ex. Copy file to..., Move file to...etc.">&lt;b&gt;To:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">dest</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">dest</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="dest">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="ellipsize">middle</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">1</property>
+ <property name="bottom-attach">2</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="progress">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pulse_step">0.10000000149</property>
+ <property name="can-focus">False</property>
+ <property name="pulse-step">0.10000000149</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">2</property>
+ <property name="bottom-attach">3</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="current">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="xalign">0</property>
+ <property name="can-focus">True</property>
<property name="label" translatable="yes" comments="Preparing to do some file operation (Copy, Move, Delete...) ">Preparing...</property>
<property name="ellipsize">middle</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">3</property>
+ <property name="bottom-attach">4</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="data_transferred_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Data transferred:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">data_transferred</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">data_transferred</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top-attach">4</property>
+ <property name="bottom-attach">5</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="data_transferred">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">4</property>
+ <property name="bottom-attach">5</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="remaining_time_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Time remaining:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">remaining_time</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">remaining_time</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="top-attach">5</property>
+ <property name="bottom-attach">6</property>
+ <property name="x-options">GTK_FILL</property>
+ <property name="y-options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="remaining_time">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
+ <property name="left-attach">1</property>
+ <property name="right-attach">2</property>
+ <property name="top-attach">5</property>
+ <property name="bottom-attach">6</property>
+ <property name="y-options"/>
</packing>
</child>
</object>
@@ -252,17 +253,17 @@
</child>
<child>
<object class="GtkVBox" id="error_pane">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Errors occurred:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">error_msg</property>
+ <property name="use-markup">True</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">error_msg</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -273,21 +274,19 @@
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-in</property>
+ <property name="can-focus">True</property>
+ <property name="shadow-type">etched-in</property>
<child>
<object class="GtkTextView" id="error_msg">
- <property name="height_request">120</property>
+ <property name="height-request">120</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="cursor_visible">False</property>
+ <property name="can-focus">True</property>
+ <property name="cursor-visible">False</property>
</object>
</child>
</object>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f7d3fa5e..44c271e1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -48,4 +48,6 @@ src/modules/gtk-fileprop-x-desktop.c
src/modules/gtk-menu-trash.c
src/tools/libfm-pref-apps.c
src/tools/lxshortcut.c
-src/udisks/g-udisks-device.c
+src/udisks/g-udisks-drive.c
+src/udisks/g-udisks-mount.c
+src/udisks/g-udisks-volume.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 8864b122..ebb5dfd1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -260,7 +260,6 @@ libfm_la_SOURCES = \
libfm_la_CFLAGS = \
$(GIO_CFLAGS) \
$(MENU_CACHE_CFLAGS) \
- $(DBUS_CFLAGS) \
$(EXIF_CFLAGS) \
-DPACKAGE_DATA_DIR=\""$(datadir)/libfm"\" \
-DPACKAGE_MODULES_DIR=\""$(libdir)/@PACKAGE@/modules"\" \
@@ -269,7 +268,6 @@ libfm_la_CFLAGS = \
libfm_la_LIBADD = \
$(GIO_LIBS) \
$(MENU_CACHE_LIBS) \
- $(DBUS_LIBS) \
$(EXIF_LIBS) \
$(INTLLIBS) \
$(NULL)
diff --git a/src/base/fm-action.c b/src/base/fm-action.c
index a4ec7d20..39e8bf23 100644
--- a/src/base/fm-action.c
+++ b/src/base/fm-action.c
@@ -1729,6 +1729,10 @@ static gboolean _matches_cond(FmFileInfoList *files, FmFileInfo *location,
gsize len;
int num;
gboolean match = TRUE, found, match_num;
+#if GLIB_CHECK_VERSION(2, 24, 0)
+ GDBusConnection *conn;
+ GVariant *result;
+#endif
if (files != NULL)
flist = fm_file_info_list_peek_head_link(files);
@@ -1832,8 +1836,8 @@ static gboolean _matches_cond(FmFileInfoList *files, FmFileInfo *location,
g_string_free(str, TRUE);
break;
case CONDITION_TYPE_DBUS: /* ShowIfRegistered */
-#if defined(ENABLE_DBUS) && GLIB_CHECK_VERSION(2, 24, 0)
- str = g_string_size_new(64);
+#if GLIB_CHECK_VERSION(2, 24, 0)
+ str = g_string_sized_new(64);
_expand_params(str, cond->str, root, TRUE, NULL);
/* DBus call is taken from GLib sources: gio/tests/gdbus-names.c */
conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, NULL);
@@ -1852,6 +1856,7 @@ static gboolean _matches_cond(FmFileInfoList *files, FmFileInfo *location,
g_variant_unref(result);
}
g_string_free(str, TRUE);
+ g_object_unref(conn);
#endif
break;
case CONDITION_TYPE_OUT_TRUE: /* ShowIfTrue */
diff --git a/src/base/fm-file-info.c b/src/base/fm-file-info.c
index 3ddbef9a..3b8b5ae8 100644
--- a/src/base/fm-file-info.c
+++ b/src/base/fm-file-info.c
@@ -70,6 +70,10 @@ static FmIcon* icon_locked_folder = NULL;
/* all of the user special dirs are direct child of home directory */
static gboolean special_dirs_all_in_home = TRUE;
+/* some functions may be called after FmFileInfo and FmMimeType
+ are finalized, so we need to make them return immediately */
+static gboolean is_initialized = FALSE;
+
typedef struct _SpecialDirInfo
{
const char* path_str;
@@ -170,8 +174,11 @@ void _fm_file_info_init(void)
special_dir_info[i].path_str = path_str;
}
}
+ is_initialized = TRUE;
}
+
+
void _fm_file_info_finalize()
{
g_object_unref(icon_locked_folder);
@@ -244,7 +251,7 @@ gboolean _fm_file_info_set_from_native_file(FmFileInfo* fi, const char* path,
char *dname;
g_return_val_if_fail(fi && fi->path, FALSE);
- if(lstat(path, &st) == 0)
+ if(is_initialized && lstat(path, &st) == 0)
{
GFile* gfile;
GFileInfo* inf;
@@ -550,6 +557,7 @@ void fm_file_info_set_from_gfileinfo(FmFileInfo* fi, GFileInfo* inf)
*/
void fm_file_info_set_from_g_file_data(FmFileInfo *fi, GFile *gf, GFileInfo *inf)
{
+ if (!is_initialized) return;
const char *tmp, *uri;
GIcon* gicon;
GFile *_gf = NULL;
@@ -791,6 +799,7 @@ FmFileInfo* fm_file_info_new_from_g_file_data(GFile *gf, GFileInfo *inf, FmPath
*/
void fm_file_info_set_from_menu_cache_item(FmFileInfo* fi, MenuCacheItem* item)
{
+ if (!is_initialized) return;
const char* icon_name;
icon_name = menu_cache_item_get_icon(item);
_fm_path_set_display_name(fi->path, menu_cache_item_get_name(item));
@@ -945,6 +954,7 @@ void fm_file_info_unref(FmFileInfo* fi)
*/
void fm_file_info_update(FmFileInfo* fi, FmFileInfo* src)
{
+ if (!is_initialized) return;
FmPath* tmp_path = fm_path_ref(src->path);
FmMimeType* tmp_type = fm_mime_type_ref(src->mime_type);
FmIcon* tmp_icon = g_object_ref(src->icon);
@@ -1363,6 +1373,7 @@ gboolean fm_file_info_is_unknown_type(FmFileInfo* fi)
/* full path of the file is required by this function */
gboolean fm_file_info_is_executable_type(FmFileInfo* fi)
{
+ if (!is_initialized) return FALSE;
const char* type = fm_mime_type_get_type(fi->mime_type);
if(strncmp(type, "text/", 5) == 0)
{ /* g_content_type_can_be_executable reports text files as executables too */
diff --git a/src/gtk/exo/exo-icon-view.c b/src/gtk/exo/exo-icon-view.c
index 3ce98099..9a432620 100644
--- a/src/gtk/exo/exo-icon-view.c
+++ b/src/gtk/exo/exo-icon-view.c
@@ -1601,6 +1601,9 @@ exo_icon_view_realize (GtkWidget *widget)
attributes.height = MAX (priv->height, allocation.height);
attributes.event_mask = GDK_EXPOSURE_MASK
| GDK_SCROLL_MASK
+#if GTK_CHECK_VERSION(3, 4, 0)
+ | GDK_SMOOTH_SCROLL_MASK
+#endif
| GDK_POINTER_MOTION_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
@@ -3413,8 +3416,6 @@ exo_icon_view_adjustment_changed (GtkAdjustment *adjustment,
if (G_UNLIKELY (icon_view->priv->doing_rubberband))
exo_icon_view_update_rubberband (GTK_WIDGET (icon_view));
-
- gdk_window_process_updates (icon_view->priv->bin_window, TRUE);
}
}
diff --git a/src/gtk/fm-file-menu.c b/src/gtk/fm-file-menu.c
index b7782a96..daf842aa 100644
--- a/src/gtk/fm-file-menu.c
+++ b/src/gtk/fm-file-menu.c
@@ -166,6 +166,13 @@ GtkActionEntry base_menu_actions[]=
{"Prop", GTK_STOCK_PROPERTIES, N_("Prop_erties"), NULL, NULL, G_CALLBACK(on_prop)}
};
+
+GtkActionEntry open_menu_actions[]=
+{
+ {"Open", GTK_STOCK_OPEN, N_("_Open"), NULL, NULL, G_CALLBACK(on_open)},
+ {"OpenWith", NULL, N_("Open _With..."), NULL, NULL, G_CALLBACK(on_open_with)},
+};
+
/* plugins for MIME type */
typedef struct {
FmMimeType *mime_type;
@@ -537,6 +544,168 @@ _disable_open:
return data;
}
+/**
+ * fm_app_menu_new_for_files
+ * @parent: window to place menu over
+ * @files: target files
+ * @cwd: working directory
+ * @auto_destroy: %TRUE if menu should be destroyed after some action was activated
+ *
+ * Creates new application menu for some files list.
+ *
+ * Returns: a new #FmFileMenu object.
+ *
+ */
+FmFileMenu* fm_app_menu_new_for_files(GtkWindow* parent, FmFileInfoList* files, FmPath* cwd, gboolean auto_destroy)
+{
+ GtkUIManager* ui;
+ GtkActionGroup* act_grp;
+ GtkAction* act;
+ FmFileInfo* fi;
+ FmFileMenu* data = g_slice_new0(FmFileMenu);
+ GString* xml;
+ GList* mime_types = NULL;
+ GList* l;
+ GList* apps = NULL;
+ gboolean all_native = TRUE;
+ unsigned items_num = fm_file_info_list_get_length(files);
+
+ data->file_infos = fm_file_info_list_ref(files);
+
+ /* create list of mime types */
+ for(l = fm_file_info_list_peek_head_link(files); l; l = l->next)
+ {
+ FmMimeType* mime_type;
+ GList* l2;
+
+ fi = l->data;
+ if (!fm_file_info_is_native(fi))
+ all_native = FALSE;
+ else if (all_native && fm_file_info_is_shortcut(fi))
+ {
+ /* this takes some time but it's inevitable */
+ FmPath *tp = fm_path_new_for_str(fm_file_info_get_target(fi));
+ if (!fm_path_is_native(tp))
+ all_native = FALSE;
+ fm_path_unref(tp);
+ }
+ mime_type = fm_file_info_get_mime_type(fi);
+ if(mime_type == NULL)
+ continue;
+ for(l2 = mime_types; l2; l2 = l2->next)
+ if(l2->data == mime_type)
+ break;
+ if(l2) /* already added */
+ continue;
+ mime_types = g_list_prepend(mime_types, fm_mime_type_ref(mime_type));
+ }
+ fi = fm_file_info_list_peek_head(files); /* we'll test it below */
+ /* create apps list */
+ if(mime_types)
+ {
+ data->same_type = (mime_types->next == NULL);
+ apps = g_app_info_get_all_for_type(fm_mime_type_get_type(mime_types->data));
+ for(l = mime_types->next; l; l = l->next)
+ {
+ GList *apps2, *l2, *l3;
+ apps2 = g_app_info_get_all_for_type(fm_mime_type_get_type(l->data));
+ for(l2 = apps; l2; )
+ {
+ for(l3 = apps2; l3; l3 = l3->next)
+ if(g_app_info_equal(l2->data, l3->data))
+ break;
+ if(l3) /* this app supports all files */
+ {
+ /* g_debug("%s supports %s", g_app_info_get_id(l2->data), fm_mime_type_get_type(l->data)); */
+ l2 = l2->next;
+ continue;
+ }
+ /* g_debug("%s invalid for %s", g_app_info_get_id(l2->data), fm_mime_type_get_type(l->data)); */
+ g_object_unref(l2->data);
+ l3 = l2->next; /* save for next iter */
+ apps = g_list_delete_link(apps, l2);
+ l2 = l3; /* continue with next item */
+ }
+ g_list_foreach(apps2, (GFunc)g_object_unref, NULL);
+ g_list_free(apps2);
+ }
+ }
+
+ data->ui = ui = gtk_ui_manager_new();
+ data->act_grp = act_grp = gtk_action_group_new("Popup");
+ gtk_action_group_set_translation_domain(act_grp, GETTEXT_PACKAGE);
+
+ if(cwd)
+ data->cwd = fm_path_ref(cwd);
+
+ gtk_action_group_add_actions(act_grp, open_menu_actions, G_N_ELEMENTS(open_menu_actions), data);
+ gtk_ui_manager_add_ui_from_string(ui, base_menu_xml, -1, NULL);
+ gtk_ui_manager_insert_action_group(ui, act_grp, 0);
+
+ xml = g_string_new("<popup><placeholder name='ph2'>");
+ if(apps) /* add specific menu items for those files */
+ {
+ gboolean use_sub = g_list_length(apps) > 50;
+ gboolean found_app = FALSE;
+
+ for(l=apps;l;l=l->next)
+ {
+ GAppInfo* app = l->data;
+
+ /*g_debug("app %s, executable %s, command %s\n",
+ g_app_info_get_name(app),
+ g_app_info_get_executable(app),
+ g_app_info_get_commandline(app));*/
+
+ gchar * program_path = g_find_program_in_path(g_app_info_get_executable(app));
+ if (!program_path)
+ goto _next_app;
+ g_free(program_path);
+ if (!all_native && !g_app_info_supports_uris(app))
+ {
+_next_app:
+ g_object_unref(app);
+ continue;
+ }
+ found_app = TRUE;
+
+ act = gtk_action_new(g_app_info_get_id(app),
+ g_app_info_get_name(app),
+ g_app_info_get_description(app),
+ NULL);
+ g_signal_connect(act, "activate", G_CALLBACK(on_open_with_app), data);
+ gtk_action_set_gicon(act, g_app_info_get_icon(app));
+ gtk_action_group_add_action(act_grp, act);
+ /* associate the app info object with the action */
+ g_object_set_qdata_full(G_OBJECT(act), fm_qdata_id, app, g_object_unref);
+ g_string_append_printf(xml, "<menuitem action='%s'/>", g_app_info_get_id(app));
+ }
+
+ g_list_free(apps); /* don't unref GAppInfos now */
+ }
+ act = gtk_ui_manager_get_action(ui, "/popup/Open");
+ gtk_action_set_visible(act, FALSE);
+ g_string_append(xml, "<menuitem action='OpenWith'/>");
+ g_string_append(xml, "</placeholder></popup>");
+
+
+ gtk_ui_manager_add_ui_from_string(ui, xml->str, xml->len, NULL);
+
+ data->menu = GTK_MENU(gtk_ui_manager_get_widget(data->ui, "/popup"));
+ gtk_menu_attach_to_widget(data->menu, GTK_WIDGET(parent), NULL);
+ g_object_weak_ref(G_OBJECT(parent), (GWeakNotify)gtk_menu_detach, data->menu);
+ fm_widget_menu_fix_tooltips(data->menu);
+
+ if(auto_destroy)
+ {
+ g_signal_connect_swapped(data->menu, "selection-done",
+ G_CALLBACK(fm_file_menu_destroy), data);
+ }
+
+ g_string_free(xml, TRUE);
+ return data;
+}
+
/**
* fm_file_menu_get_ui
* @menu: a menu
diff --git a/src/gtk/fm-file-menu.h b/src/gtk/fm-file-menu.h
index 8c4f376c..bde6a1e8 100644
--- a/src/gtk/fm-file-menu.h
+++ b/src/gtk/fm-file-menu.h
@@ -33,6 +33,7 @@ G_BEGIN_DECLS
typedef struct _FmFileMenu FmFileMenu;
FmFileMenu* fm_file_menu_new_for_file(GtkWindow* parent, FmFileInfo* fi, FmPath* cwd, gboolean auto_destroy);
+FmFileMenu* fm_app_menu_new_for_files(GtkWindow* parent, FmFileInfoList* files, FmPath* cwd, gboolean auto_destroy);
FmFileMenu* fm_file_menu_new_for_files(GtkWindow* parent, FmFileInfoList* files, FmPath* cwd, gboolean auto_destroy);
void fm_file_menu_destroy(FmFileMenu* menu);
diff --git a/src/gtk/fm-folder-view.c b/src/gtk/fm-folder-view.c
index d35dff0d..7a950792 100644
--- a/src/gtk/fm-folder-view.c
+++ b/src/gtk/fm-folder-view.c
@@ -1378,6 +1378,20 @@ static inline GtkMenu *_make_file_menu(FmFolderView* fv, GtkWindow *win,
return fm_file_menu_get_menu(menu);
}
+static inline GtkMenu *_make_app_menu(FmFolderView* fv, GtkWindow *win,
+ FmFolderViewUpdatePopup update_popup,
+ FmLaunchFolderFunc open_folders,
+ FmFileInfoList* files)
+{
+ FmFileMenu* menu;
+
+ menu = fm_app_menu_new_for_files(win, files, fm_folder_view_get_cwd(fv), TRUE);
+ fm_file_menu_set_folder_func(menu, open_folders, win);
+
+ gtk_ui_manager_ensure_update(fm_file_menu_get_ui(menu));
+ return fm_file_menu_get_menu(menu);
+}
+
static void on_file_menu(GtkAction* act, FmFolderView* fv)
{
FmFolderViewInterface *iface = FM_FOLDER_VIEW_GET_IFACE(fv);
@@ -1770,6 +1784,24 @@ void fm_folder_view_item_clicked(FmFolderView* fv, GtkTreePath* path,
open_folders, win);
fm_file_info_list_unref(files);
break;
+ case FM_FV_MIDDLE_CLICK: /* middle click */
+ files = iface->dup_selected_files(fv);
+ if(fi && fm_file_info_is_dir(fi))
+ {
+ /* handled by PCManFm */
+ }
+ else
+ {
+ if(fi)
+ {
+ files = iface->dup_selected_files(fv);
+ popup = _make_app_menu(fv, win, update_popup, open_folders, files);
+ fm_file_info_list_unref(files);
+ gtk_menu_popup(popup, NULL, NULL, popup_position_func, fv, 3,
+ gtk_get_current_event_time());
+ }
+ }
+ break;
case FM_FV_CONTEXT_MENU:
if(fi && iface->count_selected_files(fv) > 0)
/* workaround on ExoTreeView bug */
diff --git a/src/gtk/fm-progress-dlg.c b/src/gtk/fm-progress-dlg.c
index fac3a3eb..6a54172e 100644
--- a/src/gtk/fm-progress-dlg.c
+++ b/src/gtk/fm-progress-dlg.c
@@ -174,6 +174,8 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
GtkLabel *src_fi, *dest_fi;
GtkEntry *filename;
GtkToggleButton *apply_all;
+ char* comparedate;
+ char* comparesize;
char* tmp;
const char* disp_size;
FmPath* path;
@@ -208,18 +210,34 @@ static gint on_ask_rename(FmFileOpsJob* job, FmFileInfo* src, FmFileInfo* dest,
gtk_window_set_transient_for(GTK_WINDOW(dlg), GTK_WINDOW(data->dlg));
gtk_image_set_from_gicon(src_icon, G_ICON(icon), GTK_ICON_SIZE_DIALOG);
+ if (fm_file_info_get_mtime(src) > fm_file_info_get_mtime(dest))
+ comparedate = _("newer");
+ else
+ if (fm_file_info_get_mtime(src) < fm_file_info_get_mtime(dest))
+ comparedate = _("older");
+ else
+ if (fm_file_info_get_mtime(src) == fm_file_info_get_mtime(dest))
+ comparedate = _("same date/time");
disp_size = fm_file_info_get_disp_size(src);
if(disp_size)
{
- tmp = g_strdup_printf(_("Type: %s\nSize: %s\nModified: %s"),
- fm_file_info_get_desc(src), disp_size,
- fm_file_info_get_disp_mtime(src));
+ if (fm_file_info_get_size(src) > fm_file_info_get_size(dest))
+ comparesize = _("larger");
+ else
+ if (fm_file_info_get_size(src) < fm_file_info_get_size(dest))
+ comparesize = _("less");
+ else
+ if (fm_file_info_get_size(src) == fm_file_info_get_size(dest))
+ comparesize = _("same size");
+ tmp = g_strdup_printf(_("Type: %s\nSize: %s (%s)\nModified: %s (%s)"),
+ fm_file_info_get_desc(src), disp_size, comparesize,
+ fm_file_info_get_disp_mtime(src), comparedate);
}
else
{
- tmp = g_strdup_printf(_("Type: %s\nModified: %s"),
+ tmp = g_strdup_printf(_("Type: %s\nModified: %s (%s)"),
fm_file_info_get_desc(src),
- fm_file_info_get_disp_mtime(src));
+ fm_file_info_get_disp_mtime(src), comparedate);
}
gtk_label_set_text(src_fi, tmp);
@@ -457,6 +475,8 @@ static gboolean on_update_dlg(gpointer user_data)
g_string_printf(data->str, "%d %%", data->percent);
gtk_progress_bar_set_fraction(data->progress, (gdouble)data->percent/100);
gtk_progress_bar_set_text(data->progress, data->str->str);
+ g_string_printf(data->str, _("%d%% %s"), data->percent, data->op_text);
+ gtk_window_set_title(GTK_WINDOW(data->dlg), data->str->str);
/* display the amount of data transferred */
fm_file_size_to_str(trans_size_str, sizeof(trans_size_str),
@@ -658,7 +678,7 @@ static gboolean _on_show_dlg(gpointer user_data)
else
{
/* note to translators: resulting string is such as "Deleting files" */
- g_string_printf(data->str, _("%s files"), data->op_text);
+ g_string_printf(data->str, _("%d%% %s"), data->percent, data->op_text);
gtk_window_set_title(GTK_WINDOW(data->dlg), data->str->str);
}
gtk_label_set_markup(data->msg, _("<b>File operation is in progress...</b>"));
diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
index e61f4e01..01c15bd4 100644
--- a/src/modules/Makefile.am
+++ b/src/modules/Makefile.am
@@ -11,7 +11,6 @@ AM_CPPFLAGS = \
# tell libtool we compile module not library
AM_LDFLAGS = \
-no-undefined -module -avoid-version -shared -export-dynamic \
- -L$(libdir) \
$(GIO_LIBS)
# the module should be linked only with libfm, not libfm-gtk or whatever
diff --git a/src/udisks/dbus-utils.c b/src/udisks/dbus-utils.c
index aa235a6f..6122edb6 100644
--- a/src/udisks/dbus-utils.c
+++ b/src/udisks/dbus-utils.c
@@ -26,24 +26,13 @@
#include "dbus-utils.h"
#include <gio/gio.h>
-GHashTable* dbus_get_all_props(DBusGProxy* proxy, const char* iface, GError** err)
-{
- GHashTable* props = NULL;
- dbus_g_proxy_call(proxy, "GetAll", err,
- G_TYPE_STRING, iface, G_TYPE_INVALID,
- dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID);
- return props;
-}
-
-
GError* g_udisks_error_to_gio_error(GError* error)
{
if(error)
{
int code = G_IO_ERROR_FAILED;
error = g_error_new_literal(G_IO_ERROR, code, error->message);
- return error;
}
- return NULL;
+ return error;
}
diff --git a/src/udisks/dbus-utils.h b/src/udisks/dbus-utils.h
index d2128223..5fb2dd4d 100644
--- a/src/udisks/dbus-utils.h
+++ b/src/udisks/dbus-utils.h
@@ -2,6 +2,7 @@
* dbus-utils.h
*
* Copyright 2010 PCMan <pcman.tw@gmail.com>
+ * Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,83 +23,42 @@
#ifndef __DBUS_UTILS_H__
#define __DBUS_UTILS_H__
-#include <glib.h>
-#include <dbus/dbus-glib.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
-// char* dbus_get_prop(DBusGProxy* proxy, const char* iface, const char* prop);
-GHashTable* dbus_get_all_props(DBusGProxy* proxy, const char* iface, GError** err);
-
-static inline const char* dbus_prop_str(GHashTable* props, const char* name)
-{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_get_string(val) : NULL;
-}
-
-static inline const char* dbus_prop_obj_path(GHashTable* props, const char* name)
-{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? (char*)g_value_get_boxed(val) : NULL;
-}
-
-static inline const char** dbus_prop_strv(GHashTable* props, const char* name)
-{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? (const char**)g_value_get_boxed(val) : NULL;
-}
-
-static inline char* dbus_prop_dup_str(GHashTable* props, const char* name)
+static inline char* dbus_prop_dup_str(GDBusProxy* proxy, const char* name)
{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_dup_string(val) : NULL;
+ GVariant *var = g_dbus_proxy_get_cached_property(proxy, name);
+ char *str = var ? g_variant_dup_string(var, NULL) : NULL;
+ if (var) g_variant_unref(var);
+ return str;
}
-static inline char* dbus_prop_dup_obj_path(GHashTable* props, const char* name)
+static inline char** dbus_prop_dup_strv(GDBusProxy* proxy, const char* name)
{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_strdup((char*)g_value_get_boxed(val)) : NULL;
+ GVariant *var = g_dbus_proxy_get_cached_property(proxy, name);
+ char **strv = var ? g_variant_dup_bytestring_array(var, NULL) : NULL;
+ if (var) g_variant_unref(var);
+ return strv;
}
-static inline char** dbus_prop_dup_strv(GHashTable* props, const char* name)
+static inline gboolean dbus_prop_bool(GDBusProxy* proxy, const char* name)
{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_dup_boxed(val) : NULL;
+ GVariant *var = g_dbus_proxy_get_cached_property(proxy, name);
+ gboolean val = var ? g_variant_get_boolean(var) : FALSE;
+ if (var) g_variant_unref(var);
+ return val;
}
-static inline gboolean dbus_prop_bool(GHashTable* props, const char* name)
+static inline guint dbus_prop_uint(GDBusProxy* proxy, const char* name)
{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_get_boolean(val) : FALSE;
+ GVariant *var = g_dbus_proxy_get_cached_property(proxy, name);
+ guint val = var ? g_variant_get_uint32(var) : 0;
+ if (var) g_variant_unref(var);
+ return val;
}
-static inline gint dbus_prop_int(GHashTable* props, const char* name)
-{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_get_int(val) : 0;
-}
-
-static inline guint dbus_prop_uint(GHashTable* props, const char* name)
-{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_get_uint(val) : 0;
-}
-
-static inline gint64 dbus_prop_int64(GHashTable* props, const char* name)
-{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_get_int64(val) : 0;
-}
-
-static inline guint64 dbus_prop_uint64(GHashTable* props, const char* name)
-{
- GValue* val = (GValue*)g_hash_table_lookup(props, name);
- return val ? g_value_get_uint64(val) : 0;
-}
-
-// GHashTable* dbus_get_prop_async();
-// GHashTable* dbus_get_all_props_async();
-
GError* g_udisks_error_to_gio_error(GError* error);
G_END_DECLS
diff --git a/src/udisks/g-udisks-device.c b/src/udisks/g-udisks-device.c
index 773525ec..9d60e4f6 100644
--- a/src/udisks/g-udisks-device.c
+++ b/src/udisks/g-udisks-device.c
@@ -1,6 +1,7 @@
// g-udisks-device.c
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,46 +22,30 @@
#include <config.h>
#endif
-#include "g-udisks-device.h"
+#include "g-udisks-mount.h"
+#include "g-udisks-drive.h"
#include "dbus-utils.h"
-#include "udisks-device.h"
+
#include <string.h>
-#include <glib/gi18n-lib.h>
-/* This array is taken from gnome-disk-utility: gdu-volume.c
- * Copyright (C) 2007 David Zeuthen, licensed under GNU LGPL
- */
-static const struct
+struct _GUDisksDevice
+{
+ GObject parent;
+ char* obj_path; /* dbus object path */
+ GDBusProxy *proxy; /* dbus proxy for org.freedesktop.UDisks2.Block */
+ GDBusProxy *fsproxy; /* dbus proxy for org.freedesktop.UDisks2.Filesystem */
+};
+
+struct _GUDisksDeviceClass
{
- const char *disc_type;
- const char *icon_name;
- const char *ui_name;
- const char *ui_name_blank;
-} disc_data[] = {
- /* Translator: The word "blank" is used as an adjective, e.g. we are decsribing discs that are already blank */
- {"optical_cd", "media-optical-cd-rom", N_("CD-ROM Disc"), N_("Blank CD-ROM Disc")},
- {"optical_cd_r", "media-optical-cd-r", N_("CD-R Disc"), N_("Blank CD-R Disc")},
- {"optical_cd_rw", "media-optical-cd-rw", N_("CD-RW Disc"), N_("Blank CD-RW Disc")},
- {"optical_dvd", "media-optical-dvd-rom", N_("DVD-ROM Disc"), N_("Blank DVD-ROM Disc")},
- {"optical_dvd_r", "media-optical-dvd-r", N_("DVD-ROM Disc"), N_("Blank DVD-ROM Disc")},
- {"optical_dvd_rw", "media-optical-dvd-rw", N_("DVD-RW Disc"), N_("Blank DVD-RW Disc")},
- {"optical_dvd_ram", "media-optical-dvd-ram", N_("DVD-RAM Disc"), N_("Blank DVD-RAM Disc")},
- {"optical_dvd_plus_r", "media-optical-dvd-r-plus", N_("DVD+R Disc"), N_("Blank DVD+R Disc")},
- {"optical_dvd_plus_rw", "media-optical-dvd-rw-plus", N_("DVD+RW Disc"), N_("Blank DVD+RW Disc")},
- {"optical_dvd_plus_r_dl", "media-optical-dvd-dl-r-plus", N_("DVD+R DL Disc"), N_("Blank DVD+R DL Disc")},
- {"optical_dvd_plus_rw_dl", "media-optical-dvd-dl-r-plus", N_("DVD+RW DL Disc"), N_("Blank DVD+RW DL Disc")},
- {"optical_bd", "media-optical-bd-rom", N_("Blu-Ray Disc"), N_("Blank Blu-Ray Disc")},
- {"optical_bd_r", "media-optical-bd-r", N_("Blu-Ray R Disc"), N_("Blank Blu-Ray R Disc")},
- {"optical_bd_re", "media-optical-bd-re", N_("Blu-Ray RW Disc"), N_("Blank Blu-Ray RW Disc")},
- {"optical_hddvd", "media-optical-hddvd-rom", N_("HD DVD Disc"), N_("Blank HD DVD Disc")},
- {"optical_hddvd_r", "media-optical-hddvd-r", N_("HD DVD-R Disc"), N_("Blank HD DVD-R Disc")},
- {"optical_hddvd_rw", "media-optical-hddvd-rw", N_("HD DVD-RW Disc"), N_("Blank HD DVD-RW Disc")},
- {"optical_mo", "media-optical-mo", N_("MO Disc"), N_("Blank MO Disc")},
- {"optical_mrw", "media-optical-mrw", N_("MRW Disc"), N_("Blank MRW Disc")},
- {"optical_mrw_w", "media-optical-mrw-w", N_("MRW/W Disc"), N_("Blank MRW/W Disc")},
- {NULL, NULL, NULL, NULL}
+ GObjectClass parent_class;
+ void (*changed)(GUDisksDevice* dev);
};
+static guint sig_changed;
+
+static GHashTable *dev_hash;
+
static void g_udisks_device_finalize (GObject *object);
G_DEFINE_TYPE(GUDisksDevice, g_udisks_device, G_TYPE_OBJECT)
@@ -72,83 +57,24 @@ static void g_udisks_device_class_init(GUDisksDeviceClass *klass)
g_object_class = G_OBJECT_CLASS(klass);
g_object_class->finalize = g_udisks_device_finalize;
-}
-static void clear_props(GUDisksDevice* dev)
-{
- g_free(dev->dev_file);
- g_free(dev->dev_file_presentation);
- g_free(dev->name);
- g_free(dev->icon_name);
- g_free(dev->usage);
- g_free(dev->type);
- g_free(dev->uuid);
- g_free(dev->label);
- g_free(dev->vender);
- g_free(dev->model);
- g_free(dev->conn_iface);
- g_free(dev->media);
- g_free(dev->partition_slave);
-
- g_strfreev(dev->mount_paths);
+ dev_hash = g_hash_table_new(g_str_hash, g_str_equal);
+
+ sig_changed = g_signal_new("changed", G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GUDisksDeviceClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
-static void set_props(GUDisksDevice* dev, GHashTable* props)
+static void g_udisks_device_changed(GDBusProxy *proxy, GVariant *changed_properties,
+ GStrv invalidated_properties, gpointer user_data)
{
- dev->dev_file = dbus_prop_dup_str(props, "DeviceFile");
- dev->dev_file_presentation = dbus_prop_dup_str(props, "DeviceFilePresentation");
- dev->is_sys_internal = dbus_prop_bool(props, "DeviceIsSystemInternal");
- dev->is_removable = dbus_prop_bool(props, "DeviceIsRemovable");
- dev->is_read_only = dbus_prop_bool(props, "DeviceIsReadOnly");
- dev->is_drive = dbus_prop_bool(props, "DeviceIsDrive");
- dev->is_optic_disc = dbus_prop_bool(props, "DeviceIsOpticalDisc");
- dev->is_mounted = dbus_prop_bool(props, "DeviceIsMounted");
- dev->is_media_available = dbus_prop_bool(props, "DeviceIsMediaAvailable");
- dev->is_media_change_notification_polling = dbus_prop_bool(props, "DeviceIsMediaChangeDetectionPolling");
- dev->is_luks = dbus_prop_bool(props, "DeviceIsLuks");
- dev->is_luks_clear_text = dbus_prop_bool(props, "DeviceIsLuksCleartext");
- dev->is_linux_md_component = dbus_prop_bool(props, "DeviceIsLinuxMdComponent");
- dev->is_linux_md = dbus_prop_bool(props, "DeviceIsLinuxMd");
- dev->is_linux_lvm2lv = dbus_prop_bool(props, "DeviceIsLinuxLvm2LV");
- dev->is_linux_lvm2pv = dbus_prop_bool(props, "DeviceIsLinuxLvm2PV");
- dev->is_linux_dmmp_component = dbus_prop_bool(props, "DeviceIsLinuxDmmpComponent");
- dev->is_linux_dmmp = dbus_prop_bool(props, "DeviceIsLinuxDmmp");
-
- dev->is_ejectable = dbus_prop_bool(props, "DriveIsMediaEjectable");
- dev->is_disc_blank = dbus_prop_bool(props, "OpticalDiscIsBlank");
-
- dev->is_hidden = dbus_prop_bool(props, "DevicePresentationHide");
- dev->auto_mount = !dbus_prop_bool(props, "DevicePresentationNopolicy");
-
- dev->mounted_by_uid = dbus_prop_uint(props, "DeviceMountedByUid");
- dev->mount_paths = dbus_prop_dup_strv(props, "DeviceMountPaths");
-
- dev->dev_size = dbus_prop_uint64(props, "DeviceSize");
- dev->partition_size = dbus_prop_uint64(props, "PartitionSize");
-
- dev->luks_unlocked_by_uid = dbus_prop_uint(props, "LuksCleartextUnlockedByUid");
- dev->num_audio_tracks = dbus_prop_uint(props, "OpticalDiscNumAudioTracks");
-
- dev->name = dbus_prop_dup_str(props, "DevicePresentationName");
- dev->icon_name = dbus_prop_dup_str(props, "DevicePresentationIconName");
-
- dev->usage = dbus_prop_dup_str(props, "IdUsage");
- dev->type = dbus_prop_dup_str(props, "IdType");
- dev->uuid = dbus_prop_dup_str(props, "IdUuid");
- dev->label = dbus_prop_dup_str(props, "IdLabel");
- dev->vender = dbus_prop_dup_str(props, "DriveVendor");
- dev->model = dbus_prop_dup_str(props, "DriveModel");
- dev->conn_iface = dbus_prop_dup_str(props, "DriveConnectionInterface");
- dev->media = dbus_prop_dup_str(props, "DriveMedia");
-
- dev->partition_slave = dbus_prop_dup_obj_path(props, "PartitionSlave");
-
- /* how to support LUKS? */
-/*
- 'LuksHolder' read 'o'
- 'LuksCleartextSlave' read 'o'
-*/
+ g_return_if_fail(G_IS_UDISKS_DEVICE(user_data));
+ GUDisksDevice* dev = G_UDISKS_DEVICE(user_data);
+ g_signal_emit(dev, sig_changed, 0);
}
static void g_udisks_device_finalize(GObject *object)
@@ -160,8 +86,20 @@ static void g_udisks_device_finalize(GObject *object)
self = G_UDISKS_DEVICE(object);
+ g_hash_table_remove(dev_hash, self->obj_path);
+
+ if (self->proxy)
+ {
+ g_signal_handlers_disconnect_by_func(self->proxy, G_CALLBACK(g_udisks_device_changed), self);
+ g_object_unref(self->proxy);
+ }
+ if (self->fsproxy)
+ {
+ g_signal_handlers_disconnect_by_func(self->fsproxy, G_CALLBACK(g_udisks_device_changed), self);
+ g_object_unref(self->fsproxy);
+ }
+
g_free(self->obj_path);
- clear_props(self);
G_OBJECT_CLASS(g_udisks_device_parent_class)->finalize(object);
}
@@ -172,142 +110,101 @@ static void g_udisks_device_init(GUDisksDevice *self)
}
-GUDisksDevice *g_udisks_device_new(const char* obj_path, GHashTable* props)
+/**
+ *
+ * Returns: (transfer full): either new or existing GUDisksDevice instance.
+ */
+GUDisksDevice *g_udisks_device_get(const char* obj_path, GDBusConnection* con,
+ GCancellable* cancellable, GError** error)
{
- GUDisksDevice* dev = (GUDisksDevice*)g_object_new(G_TYPE_UDISKS_DEVICE, NULL);
+ GUDisksDevice* dev = dev_hash ? g_hash_table_lookup(dev_hash, obj_path) : NULL;
+
+ if (dev)
+ return g_object_ref(dev);
+
+ dev = (GUDisksDevice*)g_object_new(G_TYPE_UDISKS_DEVICE, NULL);
dev->obj_path = g_strdup(obj_path);
- set_props(dev, props);
+ g_hash_table_insert(dev_hash, dev->obj_path, dev);
+ dev->proxy = g_dbus_proxy_new_sync(con, G_DBUS_PROXY_FLAGS_NONE, NULL,
+ "org.freedesktop.UDisks2", obj_path,
+ "org.freedesktop.UDisks2.Block",
+ cancellable, error);
+ if (dev->proxy)
+ {
+ dev->fsproxy = g_dbus_proxy_new_sync(con, G_DBUS_PROXY_FLAGS_NONE, NULL,
+ "org.freedesktop.UDisks2", obj_path,
+ "org.freedesktop.UDisks2.Filesystem",
+ cancellable, error);
+ g_signal_connect(dev->proxy, "g-properties-changed",
+ G_CALLBACK(g_udisks_device_changed), dev);
+ if (dev->fsproxy)
+ g_signal_connect(dev->fsproxy, "g-properties-changed",
+ G_CALLBACK(g_udisks_device_changed), dev);
+ }
return dev;
}
-void g_udisks_device_update(GUDisksDevice* dev, GHashTable* props)
+GVariant *g_udisks_device_get_fstype(GUDisksDevice* dev)
{
- clear_props(dev);
- set_props(dev, props);
+ GVariant *var = g_dbus_proxy_get_cached_property(dev->proxy, "IdType");
+ return var ? var : g_variant_ref_sink(g_variant_new_string("auto"));
}
-DBusGProxy* g_udisks_device_get_proxy(GUDisksDevice* dev, DBusGConnection* con)
+char *g_udisks_device_get_uuid(GUDisksDevice* dev)
{
- DBusGProxy* proxy = dbus_g_proxy_new_for_name(con,
- "org.freedesktop.UDisks",
- dev->obj_path,
- "org.freedesktop.UDisks.Device");
- return proxy;
+ return dbus_prop_dup_str(dev->proxy, "IdUUID");
}
-const char* g_udisks_device_get_icon_name(GUDisksDevice* dev)
+char *g_udisks_device_get_label(GUDisksDevice* dev)
{
- const char* icon_name = NULL;
- if(dev->icon_name && *dev->icon_name)
- icon_name = dev->icon_name;
- else if(dev->media && *dev->media) /* by media type */
- {
- if(dev->is_optic_disc)
- {
- if(dev->num_audio_tracks > 0)
- icon_name = "media-optical-audio";
- else
- {
- guint i;
- icon_name = "media-optical";
- for( i = 0; i < G_N_ELEMENTS(disc_data); ++i)
- {
- if(strcmp(dev->media, disc_data[i].disc_type) == 0)
- {
- if(dev->is_disc_blank)
- icon_name = disc_data[i].icon_name;
- break;
- }
- }
- }
- }
- else
- {
- if(strcmp (dev->media, "flash_cf") == 0)
- icon_name = "media-flash-cf";
- else if(strcmp (dev->media, "flash_ms") == 0)
- icon_name = "media-flash-ms";
- else if(strcmp (dev->media, "flash_sm") == 0)
- icon_name = "media-flash-sm";
- else if(strcmp (dev->media, "flash_sd") == 0)
- icon_name = "media-flash-sd";
- else if(strcmp (dev->media, "flash_sdhc") == 0)
- icon_name = "media-flash-sd";
- else if(strcmp (dev->media, "flash_mmc") == 0)
- icon_name = "media-flash-sd";
- else if(strcmp (dev->media, "floppy") == 0)
- icon_name = "media-floppy";
- else if(strcmp (dev->media, "floppy_zip") == 0)
- icon_name = "media-floppy-zip";
- else if(strcmp (dev->media, "floppy_jaz") == 0)
- icon_name = "media-floppy-jaz";
- else if(g_str_has_prefix (dev->media, "flash"))
- icon_name = "media-flash";
- }
- }
- else if(dev->conn_iface && *dev->conn_iface) /* by connection interface */
- {
- if(g_str_has_prefix(dev->conn_iface, "ata"))
- icon_name = dev->is_removable ? "drive-removable-media-ata" : "drive-harddisk-ata";
- else if(g_str_has_prefix (dev->conn_iface, "scsi"))
- icon_name = dev->is_removable ? "drive-removable-media-scsi" : "drive-harddisk-scsi";
- else if(strcmp (dev->conn_iface, "usb") == 0)
- icon_name = dev->is_removable ? "drive-removable-media-usb" : "drive-harddisk-usb";
- else if (strcmp (dev->conn_iface, "firewire") == 0)
- icon_name = dev->is_removable ? "drive-removable-media-ieee1394" : "drive-harddisk-ieee1394";
- }
+ return dbus_prop_dup_str(dev->proxy, "IdLabel");
+}
- if(!icon_name)
- {
- if(dev->is_removable)
- icon_name = "drive-removable-media";
- else
- icon_name = "drive-harddisk";
- }
- return icon_name;
+char *g_udisks_device_get_dev_file(GUDisksDevice* dev)
+{
+ return dbus_prop_dup_str(dev->proxy, "Device");
}
-const char* g_udisks_device_get_disc_name(GUDisksDevice* dev)
+char *g_udisks_device_get_dev_basename(GUDisksDevice* dev)
{
- const char* name = NULL;
- if(!dev->is_optic_disc)
- return NULL;
- if(dev->media && *dev->media)
- {
- if(dev->num_audio_tracks > 0 && g_str_has_prefix(dev->media, "optical_cd"))
- name = "Audio CD";
- else
- {
- guint i;
- for( i = 0; i < G_N_ELEMENTS(disc_data); ++i)
- {
- if(strcmp(dev->media, disc_data[i].disc_type) == 0)
- {
- if(dev->is_disc_blank)
- name = disc_data[i].ui_name_blank;
- else
- name = disc_data[i].ui_name;
- break;
- }
- }
- }
- }
+ GVariant *var = g_dbus_proxy_get_cached_property(dev->proxy, "PreferredDevice");
+ char *basename;
- if(!name)
+ if (!var)
+ var = g_dbus_proxy_get_cached_property(dev->proxy, "Device");
+ if (var)
{
- if(dev->is_disc_blank)
- name = _("Blank Optical Disc");
- else
- name = _("Optical Disc");
+ basename = g_path_get_basename(g_variant_get_bytestring(var));
+ g_variant_unref(var);
}
- return name;
+ else
+ basename = g_path_get_basename(dev->obj_path);
+
+ return basename;
}
-gboolean g_udisks_device_is_volume(GUDisksDevice* dev)
+char *g_udisks_device_get_icon_name(GUDisksDevice* dev)
{
- /* also treat blank optical discs as volumes here to be compatible with gvfs.
- * FIXME: this is useless unless we support burn:///
- * So, should we support this? Personally I think it's a bad idea. */
- return (g_strcmp0(dev->usage, "filesystem") == 0 || dev->is_disc_blank);
+ // FIXME: check for HintSymbolicIconName if it's not blank
+ return dbus_prop_dup_str(dev->proxy, "HintIconName");
}
+gboolean g_udisks_device_can_auto_mount(GUDisksDevice* dev)
+{
+ return dbus_prop_bool(dev->proxy, "HintAuto");
+}
+
+char **g_udisks_device_get_mount_paths(GUDisksDevice* dev)
+{
+ return dev->fsproxy ? dbus_prop_dup_strv(dev->fsproxy, "MountPoints") : NULL;
+}
+
+const char *g_udisks_device_get_obj_path(GUDisksDevice* dev)
+{
+ return dev->obj_path;
+}
+
+GDBusProxy *g_udisks_device_get_fs_proxy(GUDisksDevice* dev)
+{
+ return dev->fsproxy ? g_object_ref(dev->fsproxy) : NULL;
+}
diff --git a/src/udisks/g-udisks-device.h b/src/udisks/g-udisks-device.h
index d5f736a1..b58887ce 100644
--- a/src/udisks/g-udisks-device.h
+++ b/src/udisks/g-udisks-device.h
@@ -1,6 +1,7 @@
// g-udisks-device.h
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -22,7 +23,7 @@
#define __G_UDISKS_DEVICE_H__
#include <glib-object.h>
-#include <dbus/dbus-glib.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
@@ -41,77 +42,23 @@ G_BEGIN_DECLS
typedef struct _GUDisksDevice GUDisksDevice;
typedef struct _GUDisksDeviceClass GUDisksDeviceClass;
-typedef struct _GUDisksDevicePrivate GUDisksDevicePrivate;
-
-struct _GUDisksDevice
-{
- GObject parent;
- char* obj_path; /* dbus object path */
-
- char* dev_file;
- char* dev_file_presentation;
- gboolean is_sys_internal : 1;
- gboolean is_removable : 1;
- gboolean is_read_only : 1;
- gboolean is_drive : 1;
- gboolean is_optic_disc : 1;
- gboolean is_mounted : 1;
- gboolean is_media_available : 1;
- gboolean is_media_change_notification_polling : 1;
- gboolean is_luks : 1;
- gboolean is_luks_clear_text : 1;
- gboolean is_linux_md_component : 1;
- gboolean is_linux_md : 1;
- gboolean is_linux_lvm2lv : 1;
- gboolean is_linux_lvm2pv : 1;
- gboolean is_linux_dmmp_component : 1;
- gboolean is_linux_dmmp : 1;
- gboolean is_ejectable : 1;
- gboolean is_disc_blank : 1;
- gboolean is_hidden : 1;
- gboolean auto_mount : 1;
-
- guint mounted_by_uid;
- char** mount_paths;
- guint64 dev_size;
- guint64 partition_size;
-
- guint num_audio_tracks;
- guint luks_unlocked_by_uid;
-
- char* name;
- char* icon_name;
-
- char* usage;
- char* type;
- char* uuid;
- char* label;
- char* vender;
- char* model;
- char* conn_iface;
- char* media;
- char* partition_slave;
-};
-
-struct _GUDisksDeviceClass
-{
- GObjectClass parent_class;
-};
GType g_udisks_device_get_type (void);
-GUDisksDevice* g_udisks_device_new (const char* obj_path, GHashTable* props);
-
-void g_udisks_device_update(GUDisksDevice* dev, GHashTable* props);
-
-DBusGProxy* g_udisks_device_get_proxy(GUDisksDevice* dev, DBusGConnection* con);
-
-const char* g_udisks_device_get_icon_name(GUDisksDevice* dev);
-
-/* this is only valid if the device contains a optic disc */
-const char* g_udisks_device_get_disc_name(GUDisksDevice* dev);
-gboolean g_udisks_device_is_volume(GUDisksDevice* dev);
+GUDisksDevice* g_udisks_device_get(const char* obj_path, GDBusConnection* con,
+ GCancellable* cancellable, GError** error);
+
+GVariant *g_udisks_device_get_fstype(GUDisksDevice* dev);
+char *g_udisks_device_get_uuid(GUDisksDevice* dev);
+char *g_udisks_device_get_label(GUDisksDevice* dev);
+char *g_udisks_device_get_dev_file(GUDisksDevice* dev);
+char *g_udisks_device_get_dev_basename(GUDisksDevice* dev);
+char *g_udisks_device_get_icon_name(GUDisksDevice* dev);
+char **g_udisks_device_get_mount_paths(GUDisksDevice* dev);
+gboolean g_udisks_device_can_auto_mount(GUDisksDevice* dev);
+const char *g_udisks_device_get_obj_path(GUDisksDevice* dev);
+GDBusProxy *g_udisks_device_get_fs_proxy(GUDisksDevice* dev);
G_END_DECLS
diff --git a/src/udisks/g-udisks-drive.c b/src/udisks/g-udisks-drive.c
index 7633ae27..ff638738 100644
--- a/src/udisks/g-udisks-drive.c
+++ b/src/udisks/g-udisks-drive.c
@@ -1,6 +1,7 @@
// g-udisks-drive.c
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -22,12 +23,93 @@
#endif
#include "g-udisks-drive.h"
-#include "g-udisks-device.h"
#include "g-udisks-volume.h"
-#include <string.h>
-#include "udisks-device.h"
#include "dbus-utils.h"
+#include <string.h>
+#include <glib/gi18n-lib.h>
+
+/* This array is taken from gnome-disk-utility: gdu-volume.c
+ * Copyright (C) 2007 David Zeuthen, licensed under GNU LGPL
+ */
+static const struct
+{
+ const char *disc_type;
+ const char *icon_name;
+ const char *ui_name;
+ const char *ui_name_blank;
+} disc_data[] = {
+ /* Translator: The word "blank" is used as an adjective, e.g. we are decsribing discs that are already blank */
+ {"optical_cd", "media-optical-cd-rom", N_("CD-ROM Disc"), N_("Blank CD-ROM Disc")},
+ {"optical_cd_r", "media-optical-cd-r", N_("CD-R Disc"), N_("Blank CD-R Disc")},
+ {"optical_cd_rw", "media-optical-cd-rw", N_("CD-RW Disc"), N_("Blank CD-RW Disc")},
+ {"optical_dvd", "media-optical-dvd-rom", N_("DVD-ROM Disc"), N_("Blank DVD-ROM Disc")},
+ {"optical_dvd_r", "media-optical-dvd-r", N_("DVD-ROM Disc"), N_("Blank DVD-ROM Disc")},
+ {"optical_dvd_rw", "media-optical-dvd-rw", N_("DVD-RW Disc"), N_("Blank DVD-RW Disc")},
+ {"optical_dvd_ram", "media-optical-dvd-ram", N_("DVD-RAM Disc"), N_("Blank DVD-RAM Disc")},
+ {"optical_dvd_plus_r", "media-optical-dvd-r-plus", N_("DVD+R Disc"), N_("Blank DVD+R Disc")},
+ {"optical_dvd_plus_rw", "media-optical-dvd-rw-plus", N_("DVD+RW Disc"), N_("Blank DVD+RW Disc")},
+ {"optical_dvd_plus_r_dl", "media-optical-dvd-dl-r-plus", N_("DVD+R DL Disc"), N_("Blank DVD+R DL Disc")},
+ {"optical_dvd_plus_rw_dl", "media-optical-dvd-dl-r-plus", N_("DVD+RW DL Disc"), N_("Blank DVD+RW DL Disc")},
+ {"optical_bd", "media-optical-bd-rom", N_("Blu-Ray Disc"), N_("Blank Blu-Ray Disc")},
+ {"optical_bd_r", "media-optical-bd-r", N_("Blu-Ray R Disc"), N_("Blank Blu-Ray R Disc")},
+ {"optical_bd_re", "media-optical-bd-re", N_("Blu-Ray RW Disc"), N_("Blank Blu-Ray RW Disc")},
+ {"optical_hddvd", "media-optical-hddvd-rom", N_("HD DVD Disc"), N_("Blank HD DVD Disc")},
+ {"optical_hddvd_r", "media-optical-hddvd-r", N_("HD DVD-R Disc"), N_("Blank HD DVD-R Disc")},
+ {"optical_hddvd_rw", "media-optical-hddvd-rw", N_("HD DVD-RW Disc"), N_("Blank HD DVD-RW Disc")},
+ {"optical_mo", "media-optical-mo", N_("MO Disc"), N_("Blank MO Disc")},
+ {"optical_mrw", "media-optical-mrw", N_("MRW Disc"), N_("Blank MRW Disc")},
+ {"optical_mrw_w", "media-optical-mrw-w", N_("MRW/W Disc"), N_("Blank MRW/W Disc")},
+ {NULL, NULL, NULL, NULL}
+};
+
+struct _GUDisksDrive
+{
+ GObject parent;
+ char* obj_path; /* dbus object path */
+ GUDisksDevice* dev;
+ GList* vols; /* weak_ref */
+ GIcon* icon;
+ gboolean is_removable : 1;
+ gboolean is_optic_disc : 1;
+ gboolean is_media_available : 1;
+ gboolean is_media_change_notification_polling : 1;
+ gboolean is_ejectable : 1;
+ gboolean is_disc_blank : 1;
+ guint num_audio_tracks;
+ //char* vender;
+ //char* model;
+ char* conn_iface;
+ char* media;
+ GDBusProxy *proxy; /* dbus proxy */
+};
+
+static void g_udisks_clear_props(GUDisksDrive* drv)
+{
+ //g_free(drv->vender);
+ //g_free(drv->model);
+ g_free(drv->conn_iface);
+ g_free(drv->media);
+ if(drv->icon)
+ g_object_unref(drv->icon);
+ drv->icon = NULL;
+}
+
+static void g_udisks_fill_props(GUDisksDrive* drv)
+{
+ drv->conn_iface = dbus_prop_dup_str(drv->proxy, "ConnectionBus");
+ drv->is_removable = dbus_prop_bool(drv->proxy, "MediaRemovable");
+ drv->is_optic_disc = dbus_prop_bool(drv->proxy, "Optical");
+ drv->is_media_available = dbus_prop_bool(drv->proxy, "MediaAvailable");
+ drv->is_media_change_notification_polling = dbus_prop_bool(drv->proxy, "MediaChangeDetected");
+ drv->is_ejectable = dbus_prop_bool(drv->proxy, "Ejectable");
+ drv->is_disc_blank = dbus_prop_bool(drv->proxy, "OpticalBlank");
+ drv->num_audio_tracks = dbus_prop_uint(drv->proxy, "OpticalNumAudioTracks");
+ //drv->vender = dbus_prop_dup_str(drv->proxy, "Vendor");
+ //drv->model = dbus_prop_dup_str(drv->proxy, "Model");
+ drv->media = dbus_prop_dup_str(drv->proxy, "Media");
+}
+
typedef struct
{
GUDisksDrive* drv;
@@ -36,8 +118,6 @@ typedef struct
GMountOperation* op;
GCancellable* cancellable;
gpointer user_data;
- DBusGProxy* proxy;
- DBusGProxyCall* call;
GList* mounts;
}EjectData;
@@ -66,13 +146,13 @@ static void g_udisks_drive_class_init(GUDisksDriveClass *klass)
static gboolean g_udisks_drive_can_eject (GDrive* base)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
- return drv->dev->is_ejectable;
+ return drv->is_ejectable;
}
static gboolean g_udisks_drive_can_poll_for_media (GDrive* base)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
- return drv->dev->is_media_change_notification_polling;
+ return drv->is_media_change_notification_polling;
}
static gboolean g_udisks_drive_can_start (GDrive* base)
@@ -98,48 +178,44 @@ static gboolean g_udisks_drive_can_stop (GDrive* base)
static GList* g_udisks_drive_get_volumes (GDrive* base)
{
- /* FIXME: is it a better idea to save all volumes in GUDisksDrive instead? */
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
- GList* vols = g_volume_monitor_get_volumes(G_VOLUME_MONITOR(drv->mon));
- GList* l;
- GList* ret = NULL;
- for(l = vols;l;l=l->next)
- {
- GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- if(vol->drive == drv)
- ret = g_list_prepend(ret, vol);
- else
- g_object_unref(vol);
- }
- g_list_free(vols);
- return ret;
+ GList* vols = g_list_copy(drv->vols);
+ g_list_foreach(vols, (GFunc)g_object_ref, NULL);
+ return vols;
}
-static void on_eject_cancelled(GCancellable* cancellable, gpointer user_data);
-
static void finish_eject(GSimpleAsyncResult* res, EjectData* data)
{
g_simple_async_result_complete(res);
g_object_unref(res);
g_object_unref(data->drv);
- if(data->cancellable)
- {
- g_signal_handlers_disconnect_by_func(data->cancellable, on_eject_cancelled, data);
+ if (data->op)
+ g_object_unref(data->op);
+ if (data->cancellable)
g_object_unref(data->cancellable);
+ while (data->mounts)
+ {
+ g_object_unref(data->mounts->data);
+ data->mounts = g_list_delete_link(data->mounts, data->mounts);
}
- if(data->proxy)
- g_object_unref(data->proxy);
+
g_slice_free(EjectData, data);
}
-static void on_ejected(DBusGProxy *proxy, GError *error, gpointer user_data)
+static void on_ejected(GObject *source_object, GAsyncResult *result, gpointer user_data)
{
EjectData* data = (EjectData*)user_data;
- GSimpleAsyncResult* res;
- if(error)
+ GDBusProxy *proxy = (GDBusProxy *)source_object;
+ GError *err = NULL;
+ GSimpleAsyncResult *res;
+ GVariant *val = g_dbus_proxy_call_finish(proxy, result, &err);
+
+ if(err)
{
- error = g_udisks_error_to_gio_error(error);
+ //TODO: use data->op to handle errors?
+ GError *error = g_udisks_error_to_gio_error(err);
+ g_error_free(err);
res = g_simple_async_result_new_from_error(G_OBJECT(data->drv),
data->callback,
data->user_data,
@@ -152,19 +228,22 @@ static void on_ejected(DBusGProxy *proxy, GError *error, gpointer user_data)
data->callback,
data->user_data,
NULL);
- g_simple_async_result_set_op_res_gboolean(res, TRUE);
+ g_simple_async_result_set_op_res_gboolean(res, TRUE); // FIXME
+ if (val)
+ g_variant_unref(val);
}
finish_eject(res, data);
}
static void do_eject(EjectData* data)
{
- data->proxy = g_udisks_device_get_proxy(data->drv->dev, data->drv->mon->con);
- data->call = org_freedesktop_UDisks_Device_drive_eject_async(
- data->proxy,
- NULL,
- on_ejected,
- data);
+ GVariantBuilder b;
+ g_debug("%s: sending DBus request", __func__);
+ g_variant_builder_init(&b, G_VARIANT_TYPE("(a{sv})"));
+ g_variant_builder_open(&b, G_VARIANT_TYPE ("a{sv}"));
+ g_variant_builder_close(&b);
+ g_dbus_proxy_call(data->drv->proxy, "Eject", g_variant_builder_end(&b),
+ G_DBUS_CALL_FLAGS_NONE, -1, data->cancellable, on_ejected, data);
}
static void unmount_before_eject(EjectData* data);
@@ -178,6 +257,9 @@ static void on_unmounted(GObject* mnt, GAsyncResult* res, gpointer input_data)
gboolean success = g_mount_unmount_with_operation_finish(G_MOUNT(mnt), res, &err);
if(success)
{
+ /* we did picked first one from list */
+ data->mounts = g_list_delete_link(data->mounts, data->mounts);
+ g_object_unref(mnt);
if(data->mounts) /* we still have some volumes on this drive mounted */
unmount_before_eject(data);
else /* all unmounted, do the eject. */
@@ -186,14 +268,12 @@ static void on_unmounted(GObject* mnt, GAsyncResult* res, gpointer input_data)
else
{
GSimpleAsyncResult* res;
- GError* error = g_udisks_error_to_gio_error(err);
- g_error_free(err);
res = g_simple_async_result_new_from_error(G_OBJECT(data->drv),
data->callback,
data->user_data,
err);
finish_eject(res, data);
- g_error_free(error);
+ g_error_free(err);
}
#undef data
}
@@ -201,21 +281,10 @@ static void on_unmounted(GObject* mnt, GAsyncResult* res, gpointer input_data)
static void unmount_before_eject(EjectData* data)
{
GMount* mnt = G_MOUNT(data->mounts->data);
- data->mounts = g_list_delete_link(data->mounts, data->mounts);
/* pop the first GMount in the list. */
g_mount_unmount_with_operation(mnt, data->flags, data->op,
data->cancellable,
on_unmounted, data);
- /* FIXME: Notify volume monitor!! */
- g_object_unref(mnt);
-}
-
-static void on_eject_cancelled(GCancellable* cancellable, gpointer user_data)
-{
- EjectData* data = (EjectData*)user_data;
- /* cancel the dbus call if needed */
- if(data->call)
- dbus_g_proxy_cancel_call(data->proxy, data->call);
}
static void g_udisks_drive_eject_with_operation (GDrive* base, GMountUnmountFlags flags, GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
@@ -231,13 +300,12 @@ static void g_udisks_drive_eject_with_operation (GDrive* base, GMountUnmountFlag
GList* l;
for(l = vols; l; l=l->next)
{
- GVolume* vol = G_VOLUME(l->data);
- GMount* mnt = g_volume_get_mount(vol);
- if(mnt)
- mounts = g_list_prepend(mounts, mnt);
+ GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
+ mounts = g_list_concat(g_udisks_volume_get_mounts(vol), mounts);
g_object_unref(vol);
}
g_list_free(vols);
+ g_list_foreach(mounts, (GFunc)g_object_ref, NULL);
}
data = g_slice_new0(EjectData);
@@ -248,9 +316,6 @@ static void g_udisks_drive_eject_with_operation (GDrive* base, GMountUnmountFlag
data->op = mount_operation ? g_object_ref(mount_operation) : NULL;
data->user_data = user_data;
- if(cancellable)
- g_signal_connect(cancellable, "cancelled", G_CALLBACK(on_eject_cancelled), data);
-
if(mounts) /* unmount all GMounts first, and do eject in ready callback */
{
/* NOTE: is this really needed?
@@ -294,13 +359,128 @@ static char** g_udisks_drive_enumerate_identifiers (GDrive* base)
return kinds;
}
+const char* g_udisks_drive_get_obj_path(GUDisksDrive* drv)
+{
+ return drv->obj_path;
+}
+
+static const char* g_udisks_drive_get_icon_name(GUDisksDrive* drv)
+{
+ const char* icon_name = NULL;
+
+ if(drv->media && *drv->media) /* by media type */
+ {
+ if(drv->is_optic_disc)
+ {
+ if(drv->num_audio_tracks > 0)
+ icon_name = "media-optical-audio";
+ else
+ {
+ guint i;
+ icon_name = "media-optical";
+ for( i = 0; i < G_N_ELEMENTS(disc_data); ++i)
+ {
+ if(strcmp(drv->media, disc_data[i].disc_type) == 0)
+ {
+ if(drv->is_disc_blank)
+ icon_name = disc_data[i].icon_name;
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ if(strcmp (drv->media, "flash_cf") == 0)
+ icon_name = "media-flash-cf";
+ else if(strcmp (drv->media, "flash_ms") == 0)
+ icon_name = "media-flash-ms";
+ else if(strcmp (drv->media, "flash_sm") == 0)
+ icon_name = "media-flash-sm";
+ else if(g_str_has_prefix (drv->media, "flash_sd"))
+ icon_name = "media-flash-sd";
+ else if(strcmp (drv->media, "flash_mmc") == 0)
+ icon_name = "media-flash-sd";
+ else if(strcmp (drv->media, "floppy") == 0)
+ icon_name = "media-floppy";
+ else if(strcmp (drv->media, "floppy_zip") == 0)
+ icon_name = "media-floppy-zip";
+ else if(strcmp (drv->media, "floppy_jaz") == 0)
+ icon_name = "media-floppy-jaz";
+ else if(g_str_has_prefix (drv->media, "flash"))
+ icon_name = "media-flash";
+ else if(strcmp (drv->media, "thumb") == 0)
+ icon_name = "drive-harddisk-usb";
+ }
+ }
+ else if(drv->conn_iface && *drv->conn_iface) /* by connection interface */
+ {
+/* if(g_str_has_prefix(drv->conn_iface, "ata"))
+ icon_name = drv->is_removable ? "drive-removable-media-ata" : "drive-harddisk-ata";
+ else if(g_str_has_prefix (drv->conn_iface, "scsi"))
+ icon_name = drv->is_removable ? "drive-removable-media-scsi" : "drive-harddisk-scsi";
+ else */
+ if(strcmp (drv->conn_iface, "usb") == 0)
+ icon_name = drv->is_removable ? "drive-removable-media-usb" : "drive-harddisk-usb";
+ else if (strcmp (drv->conn_iface, "ieee1394") == 0)
+ icon_name = drv->is_removable ? "drive-removable-media-ieee1394" : "drive-harddisk-ieee1394";
+ }
+
+ if(!icon_name)
+ {
+ if(drv->is_removable)
+ icon_name = "drive-removable-media";
+ else
+ icon_name = "drive-harddisk";
+ }
+ return icon_name;
+}
+
+const char* g_udisks_drive_get_disc_name(GUDisksDrive* drv)
+{
+ const char* name = NULL;
+ if(!drv || !drv->is_optic_disc)
+ return NULL;
+ if(drv->media && *drv->media)
+ {
+ if(drv->num_audio_tracks > 0 && g_str_has_prefix(drv->media, "optical_cd"))
+ name = _("Audio CD");
+ else
+ {
+ guint i;
+ for( i = 0; i < G_N_ELEMENTS(disc_data); ++i)
+ {
+ if(strcmp(drv->media, disc_data[i].disc_type) == 0)
+ {
+ if(drv->is_disc_blank)
+ name = gettext(disc_data[i].ui_name_blank);
+ else
+ name = gettext(disc_data[i].ui_name);
+ break;
+ }
+ }
+ }
+ }
+
+ if(!name)
+ {
+ if(drv->is_disc_blank)
+ name = _("Blank Optical Disc");
+ else
+ name = _("Optical Disc");
+ }
+ return name;
+}
+
static GIcon* g_udisks_drive_get_icon (GDrive* base)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
if(!drv->icon)
{
- const char* icon_name = g_udisks_device_get_icon_name(drv->dev);
+ char* drv_icon_name = drv->dev ? g_udisks_device_get_icon_name(drv->dev) : NULL;
+ const char* icon_name = drv_icon_name ? drv_icon_name : g_udisks_drive_get_icon_name(drv);
drv->icon = g_themed_icon_new_with_default_fallbacks(icon_name);
+ g_free(drv_icon_name);
}
return (GIcon*)g_object_ref(drv->icon);
}
@@ -308,14 +488,14 @@ static GIcon* g_udisks_drive_get_icon (GDrive* base)
static char* g_udisks_drive_get_identifier (GDrive* base, const char* kind)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
- if(kind)
+ if(kind && drv->dev)
{
if(strcmp(kind, G_VOLUME_IDENTIFIER_KIND_LABEL) == 0)
- return g_strdup(drv->dev->label);
+ return g_udisks_device_get_label(drv->dev);
else if(strcmp(kind, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE) == 0)
- return g_strdup(drv->dev->dev_file);
+ return g_udisks_device_get_dev_file(drv->dev);
else if(strcmp(kind, G_VOLUME_IDENTIFIER_KIND_UUID) == 0)
- return g_strdup(drv->dev->uuid);
+ return g_udisks_device_get_uuid(drv->dev);
}
return NULL;
}
@@ -337,7 +517,7 @@ static GDriveStartStopType g_udisks_drive_get_start_stop_type (GDrive* base)
static gboolean g_udisks_drive_has_media (GDrive* base)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
- return drv->dev->is_media_available;
+ return drv->is_media_available;
}
static gboolean g_udisks_drive_has_volumes (GDrive* base)
@@ -350,13 +530,13 @@ static gboolean g_udisks_drive_is_media_check_automatic (GDrive* base)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
/* FIXME: is this correct? */
- return drv->dev->is_media_change_notification_polling;
+ return drv->is_media_change_notification_polling;
}
static gboolean g_udisks_drive_is_media_removable (GDrive* base)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(base);
- return drv->dev->is_removable;
+ return drv->is_removable;
}
static void g_udisks_drive_poll_for_media (GDrive* base, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
@@ -397,6 +577,17 @@ static gboolean g_udisks_drive_stop_finish (GDrive* base, GAsyncResult* res, GEr
return FALSE;
}
+static void g_udisks_drive_changed(GDBusProxy *proxy, GVariant *changed_properties,
+ GStrv invalidated_properties, gpointer user_data)
+{
+ g_return_if_fail(G_IS_UDISKS_DRIVE(user_data));
+ GUDisksDrive* drv = G_UDISKS_DRIVE(user_data);
+
+ g_udisks_clear_props(drv);
+ g_udisks_fill_props(drv);
+ g_signal_emit(drv, sig_changed, 0);
+}
+
void g_udisks_drive_drive_iface_init (GDriveIface * iface)
{
@@ -442,9 +633,26 @@ static void g_udisks_drive_finalize(GObject *object)
g_return_if_fail(G_IS_UDISKS_DRIVE(object));
self = G_UDISKS_DRIVE(object);
+
if(self->dev)
g_object_unref(self->dev);
+ if(self->proxy)
+ {
+ g_signal_handlers_disconnect_by_func(self->proxy, G_CALLBACK(g_udisks_drive_changed), self);
+ g_object_unref(self->proxy);
+ }
+
+ if(self->vols)
+ {
+ g_warning("GUDisksDrive: volumes list isn't empty on exit!");
+ g_list_free(self->vols);
+ }
+
+ g_udisks_clear_props(self);
+
+ g_free(self->obj_path);
+
G_OBJECT_CLASS(g_udisks_drive_parent_class)->finalize(object);
}
@@ -454,18 +662,51 @@ static void g_udisks_drive_init(GUDisksDrive *self)
}
-GUDisksDrive *g_udisks_drive_new(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
+GUDisksDrive *g_udisks_drive_new(GDBusConnection* con, const char *obj_path,
+ GCancellable* cancellable, GError** error)
{
GUDisksDrive* drv = (GUDisksDrive*)g_object_new(G_TYPE_UDISKS_DRIVE, NULL);
- drv->dev = g_object_ref(dev);
- drv->mon = mon;
+ drv->obj_path = g_strdup(obj_path);
+ drv->proxy = g_dbus_proxy_new_sync(con, G_DBUS_PROXY_FLAGS_NONE, NULL,
+ "org.freedesktop.UDisks2", obj_path,
+ "org.freedesktop.UDisks2.Drive",
+ cancellable, error);
+ if (drv->proxy)
+ {
+ g_udisks_fill_props(drv);
+ g_signal_connect(drv->proxy, "g-properties-changed",
+ G_CALLBACK(g_udisks_drive_changed), drv);
+ }
return drv;
}
+void g_udisks_drive_set_device_path(GUDisksDrive* drv, const char* obj_path,
+ GDBusConnection* con, GCancellable* cancellable,
+ GError** error)
+{
+ g_return_if_fail(G_IS_UDISKS_DRIVE(drv));
+ if(drv->dev)
+ g_object_unref(drv->dev);
+ drv->dev = g_udisks_device_get(obj_path, con, cancellable, error);
+}
-void g_udisks_drive_changed(GUDisksDrive* drv)
+void g_udisks_drive_add_volume(GUDisksDrive* drv, GUDisksVolume* vol)
{
- g_signal_emit(drv, sig_changed, 0);
+ GList *l = g_list_find(drv->vols, vol);
+ if(l)
+ g_warning("Volume is already in list on drive!");
+ else
+ drv->vols = g_list_append(drv->vols, vol);
+}
+
+void g_udisks_drive_del_volume(GUDisksDrive* drv, GUDisksVolume* vol)
+{
+ drv->vols = g_list_remove(drv->vols, vol);
+}
+
+gboolean g_udisks_drive_is_disc_blank(GUDisksDrive* drv)
+{
+ return drv->is_disc_blank;
}
void g_udisks_drive_disconnected(GUDisksDrive* drv)
diff --git a/src/udisks/g-udisks-drive.h b/src/udisks/g-udisks-drive.h
index 5c0c3661..341fc080 100644
--- a/src/udisks/g-udisks-drive.h
+++ b/src/udisks/g-udisks-drive.h
@@ -1,6 +1,7 @@
// g-udisks-drive.h
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -22,8 +23,6 @@
#define __G_UDISKS_DRIVE_H__
#include <gio/gio.h>
-#include "g-udisks-device.h"
-#include "g-udisks-volume-monitor.h"
G_BEGIN_DECLS
@@ -43,15 +42,6 @@ G_BEGIN_DECLS
typedef struct _GUDisksDrive GUDisksDrive;
typedef struct _GUDisksDriveClass GUDisksDriveClass;
-struct _GUDisksDrive
-{
- GObject parent;
- GUDisksDevice* dev;
- GIcon* icon;
- char* name;
- GUDisksVolumeMonitor* mon;
-};
-
struct _GUDisksDriveClass
{
GObjectClass parent_class;
@@ -59,11 +49,22 @@ struct _GUDisksDriveClass
GType g_udisks_drive_get_type(void);
-GUDisksDrive* g_udisks_drive_new(GUDisksVolumeMonitor* mon, GUDisksDevice* dev);
+GUDisksDrive* g_udisks_drive_new(GDBusConnection* con, const char *obj_path,
+ GCancellable* cancellable, GError** error);
+
+void g_udisks_drive_set_device_path(GUDisksDrive* drv, const char* obj_path,
+ GDBusConnection* con, GCancellable* cancellable,
+ GError** error);
-void g_udisks_drive_changed(GUDisksDrive* drv);
void g_udisks_drive_disconnected(GUDisksDrive* drv);
+const char* g_udisks_drive_get_obj_path(GUDisksDrive* drv);
+
+/* this is only valid if the device contains a optic disc */
+const char* g_udisks_drive_get_disc_name(GUDisksDrive* drv);
+
+gboolean g_udisks_drive_is_disc_blank(GUDisksDrive* drv);
+
G_END_DECLS
#endif /* __G_UDISKS_DRIVE_H__ */
diff --git a/src/udisks/g-udisks-mount.c b/src/udisks/g-udisks-mount.c
index ba5cf79a..d28aed5a 100644
--- a/src/udisks/g-udisks-mount.c
+++ b/src/udisks/g-udisks-mount.c
@@ -1,6 +1,7 @@
// g-udisks-mount.c
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,19 +22,28 @@
#include <config.h>
#endif
-#include "g-udisks-volume.h"
-#include "udisks-device.h"
-#include "dbus-utils.h"
+#include "g-udisks-mount.h"
+
+#include <glib/gi18n-lib.h>
+
+struct _GUDisksMount
+{
+ GObject parent;
+ GUDisksVolume* vol; /* weak */
+ GFile* root;
+};
typedef struct
{
GUDisksMount* mnt;
GAsyncReadyCallback callback;
+ GMountOperation* mount_operation;
gpointer user_data;
- DBusGProxy* proxy;
- DBusGProxyCall* call;
}AsyncData;
+static guint sig_pre_unmount;
+static guint sig_unmounted;
+
static void g_udisks_mount_mount_iface_init(GMountIface *iface);
static void g_udisks_mount_finalize (GObject *object);
@@ -72,24 +82,27 @@ static void g_udisks_mount_init(GUDisksMount *self)
}
-GUDisksMount *g_udisks_mount_new(GUDisksVolume* vol)
+GUDisksMount *g_udisks_mount_new(GUDisksVolume* vol, GFile* root)
{
+ g_return_val_if_fail(vol, NULL);
+ g_return_val_if_fail(root, NULL);
GUDisksMount* mnt = g_object_new(G_TYPE_UDISKS_MOUNT, NULL);
/* we don't do g_object_ref here to prevent circular reference. */
mnt->vol = vol;
+ mnt->root = g_object_ref_sink(root);
return mnt;
}
static gboolean g_udisks_mount_can_eject (GMount* base)
{
GUDisksMount* mnt = G_UDISKS_MOUNT(base);
- return mnt->vol ? mnt->vol->dev->is_ejectable : FALSE;
+ return mnt->vol ? g_volume_can_eject(G_VOLUME(mnt->vol)) : FALSE;
}
static gboolean g_udisks_mount_can_unmount (GMount* base)
{
GUDisksMount* mnt = G_UDISKS_MOUNT(base);
- return mnt->vol ? mnt->vol->dev->is_mounted : FALSE;
+ return mnt->root != NULL;
}
typedef struct
@@ -163,11 +176,6 @@ static char* g_udisks_mount_get_name (GMount* base)
static GFile* g_udisks_mount_get_root (GMount* base)
{
GUDisksMount* mnt = G_UDISKS_MOUNT(base);
- if(!mnt->root && mnt->vol->dev->is_mounted && mnt->vol->dev->mount_paths)
- {
- /* TODO */
- mnt->root = g_file_new_for_path(mnt->vol->dev->mount_paths[0]);
- }
return mnt->root ? (GFile*)g_object_ref(mnt->root) : NULL;
}
@@ -180,7 +188,7 @@ static char* g_udisks_mount_get_uuid (GMount* base)
static GVolume* g_udisks_mount_get_volume (GMount* base)
{
GUDisksMount* mnt = G_UDISKS_MOUNT(base);
- return (GVolume*)mnt->vol;
+ return (GVolume*)g_object_ref(mnt->vol);
}
typedef struct
@@ -265,13 +273,16 @@ static gchar** g_udisks_mount_guess_content_type_sync (GMount* base, gboolean fo
/* TODO */
//}
-static void unmount_callback(DBusGProxy *proxy, GError *error, gpointer user_data)
+static void unmount_callback(GObject *source, GAsyncResult *result, gpointer user_data)
{
+ GDBusProxy *proxy = G_DBUS_PROXY(source);
AsyncData* data = (AsyncData*)user_data;
GSimpleAsyncResult* res;
+ GError *error = NULL;
+ GVariant *val = g_dbus_proxy_call_finish(proxy, result, &error);
if(error)
{
- error = g_udisks_error_to_gio_error(error);
+ // FIXME: use data->mount_operation to decide what to do
res = g_simple_async_result_new_from_error(G_OBJECT(data->mnt),
data->callback,
data->user_data,
@@ -285,42 +296,57 @@ static void unmount_callback(DBusGProxy *proxy, GError *error, gpointer user_dat
data->user_data,
NULL);
g_simple_async_result_set_op_res_gboolean(res, TRUE);
+ if (val) g_variant_unref(val);
}
g_simple_async_result_complete(res);
g_object_unref(res);
g_object_unref(data->mnt);
- g_object_unref(data->proxy);
+ if(data->mount_operation)
+ g_object_unref(data->mount_operation);
g_slice_free(AsyncData, data);
}
-static void on_unmount_cancelled(GCancellable* cancellable, gpointer user_data)
-{
- AsyncData* data = (AsyncData*)user_data;
- dbus_g_proxy_cancel_call(data->proxy, data->call);
-}
-
static void g_udisks_mount_unmount_with_operation (GMount* base, GMountUnmountFlags flags, GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
GUDisksMount* mnt = G_UDISKS_MOUNT(base);
if(mnt->vol)
{
- GUDisksDevice* dev = mnt->vol->dev;
- GUDisksVolumeMonitor* mon = mnt->vol->mon;
- AsyncData* data = g_slice_new(AsyncData);
- DBusGProxy* proxy = g_udisks_device_get_proxy(dev, mon->con);
- data->mnt = g_object_ref(mnt);
- data->callback = callback;
- data->user_data = user_data;
- data->proxy = proxy;
-
- g_signal_emit_by_name(mon, "mount-pre-unmount", mnt);
- g_signal_emit_by_name(mnt, "pre-unmount");
-
- data->call = org_freedesktop_UDisks_Device_filesystem_unmount_async(
- proxy, NULL, unmount_callback, data);
- if(cancellable)
- g_signal_connect(cancellable, "cancelled", G_CALLBACK(on_unmount_cancelled), data);
+ GUDisksDevice* dev = g_udisks_volume_get_device(mnt->vol);
+ GDBusProxy* proxy = dev ? g_udisks_device_get_fs_proxy(dev) : NULL;
+ if(proxy)
+ {
+ AsyncData* data = g_slice_new(AsyncData);
+ GVariantBuilder b;
+ data->mnt = g_object_ref(mnt);
+ data->callback = callback;
+ data->user_data = user_data;
+ data->mount_operation = mount_operation ? g_object_ref(mount_operation) : NULL;
+
+ g_debug("send DBus request to unmount %s", g_udisks_device_get_obj_path(dev));
+ g_signal_emit(mnt, sig_pre_unmount, 0);
+
+ g_variant_builder_init(&b, G_VARIANT_TYPE("(a{sv})"));
+ g_variant_builder_open(&b, G_VARIANT_TYPE ("a{sv}"));
+ g_variant_builder_close(&b);
+ g_dbus_proxy_call(proxy, "Unmount", g_variant_builder_end(&b),
+ G_DBUS_CALL_FLAGS_NONE, -1, cancellable,
+ unmount_callback, data);
+ g_object_unref(proxy);
+ }
+ else
+ {
+ GSimpleAsyncResult* res;
+ char *dev_file = dev ? g_udisks_device_get_dev_file(dev) : NULL;
+
+ res = g_simple_async_result_new_error(G_OBJECT(mnt), callback, user_data,
+ G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("No filesystem proxy for '%s'"),
+ dev_file);
+ g_simple_async_result_complete(res);
+ g_object_unref(res);
+ g_free(dev_file);
+ }
}
}
@@ -362,4 +388,13 @@ void g_udisks_mount_mount_iface_init(GMountIface *iface)
iface->guess_content_type = g_udisks_mount_guess_content_type;
iface->guess_content_type_finish = g_udisks_mount_guess_content_type_finish;
iface->guess_content_type_sync = g_udisks_mount_guess_content_type_sync;
+
+ sig_pre_unmount = g_signal_lookup("pre-unmount", G_TYPE_MOUNT);
+ sig_unmounted = g_signal_lookup("unmounted", G_TYPE_MOUNT);
+}
+
+void g_udisks_mount_unmounted(GUDisksMount* mnt)
+{
+ g_signal_emit(mnt, sig_unmounted, 0);
+ mnt->vol = NULL; /* disowned by the volume now */
}
diff --git a/src/udisks/g-udisks-mount.h b/src/udisks/g-udisks-mount.h
index 09ea443b..ee2a13d6 100644
--- a/src/udisks/g-udisks-mount.h
+++ b/src/udisks/g-udisks-mount.h
@@ -1,6 +1,7 @@
// g-udisks-mount.h
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -22,6 +23,7 @@
#define __G_UDISKS_MOUNT_H__
#include <gio/gio.h>
+#include "g-udisks-volume.h"
G_BEGIN_DECLS
@@ -40,14 +42,6 @@ G_BEGIN_DECLS
typedef struct _GUDisksMount GUDisksMount;
typedef struct _GUDisksMountClass GUDisksMountClass;
-typedef struct _GUDisksMountPrivate GUDisksMountPrivate;
-
-struct _GUDisksMount
-{
- GObject parent;
- struct _GUDisksVolume* vol;
- GFile* root;
-};
struct _GUDisksMountClass
{
@@ -56,8 +50,9 @@ struct _GUDisksMountClass
GType g_udisks_mount_get_type(void);
-GUDisksMount* g_udisks_mount_new(struct _GUDisksVolume* vol);
+GUDisksMount* g_udisks_mount_new(GUDisksVolume* vol, GFile *path);
+void g_udisks_mount_unmounted(GUDisksMount* mnt);
G_END_DECLS
diff --git a/src/udisks/g-udisks-volume-monitor.c b/src/udisks/g-udisks-volume-monitor.c
index 0c2975ef..df9df294 100644
--- a/src/udisks/g-udisks-volume-monitor.c
+++ b/src/udisks/g-udisks-volume-monitor.c
@@ -2,6 +2,7 @@
* g-udisks-volume-monitor.c
*
* Copyright 2010 PCMan <pcman.tw@gmail.com>
+ * Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,41 +24,53 @@
#include <config.h>
#endif
-#include "dbus-utils.h"
-#include "udisks.h"
-
#include "g-udisks-volume-monitor.h"
-#include "g-udisks-device.h"
#include "g-udisks-drive.h"
-#include "g-udisks-volume.h"
+#include "g-udisks-mount.h"
+
+#include <string.h>
/* FIXME: later we need to remove this when gio-udisks becomes an
* independent gio module. */
#include "fm-config.h"
+/*
+ * Relations:
+ * Monitor => Volume => Device
+ * => Mount[]
+ * <= (weak)
+ * => Drive
+ * => Drive => (man)Volume[]
+ * => Device(*)
+ */
+
+struct _GUDisksVolumeMonitor
+{
+ GNativeVolumeMonitor parent;
+ GDBusConnection* con;
+ GDBusProxy* udisks_proxy;
+ GCancellable *cancellable;
+
+ GList* volumes;
+ GList* drives;
+};
+
static guint sig_drive_changed;
static guint sig_drive_connected;
static guint sig_drive_disconnected;
static guint sig_drive_eject_button;
+static guint sig_drive_stop_button;
static guint sig_mount_added;
static guint sig_mount_changed;
-static guint sig_mount_premount;
+static guint sig_mount_preunmount;
static guint sig_mount_removed;
static guint sig_volume_added;
static guint sig_volume_changed;
static guint sig_volume_removed;
-static void g_udisks_device_added(GUDisksDevice* dev, GUDisksVolumeMonitor* mon);
-static void g_udisks_device_changed(GUDisksDevice* dev, GUDisksVolumeMonitor* mon);
-static void g_udisks_device_removed(GUDisksDevice* dev, GUDisksVolumeMonitor* mon);
-
-typedef void (*GUDisksDeviceEventHandler)(GUDisksDevice*, GUDisksVolumeMonitor*);
-
-typedef struct
-{
- GUDisksDevice* dev;
- GUDisksDeviceEventHandler func;
-}QueuedEvent;
+static GUDisksDrive *add_drive(GUDisksVolumeMonitor* mon, const char *obj_path,
+ gboolean emit_signal);
+static void remove_drive(GUDisksVolumeMonitor* mon, const char* obj_path);
static void g_udisks_volume_monitor_finalize (GObject *object);
static GMount* get_mount_for_mount_path(const char *mount_path, GCancellable *cancellable);
@@ -70,31 +83,112 @@ static GVolume *get_volume_for_uuid(GVolumeMonitor *mon, const char *uuid);
static GMount *get_mount_for_uuid(GVolumeMonitor *mon, const char *uuid);
static void drive_eject_button(GVolumeMonitor *mon, GDrive *drive);
-static void add_device(GUDisksVolumeMonitor* mon, DBusGProxy* proxy, const char* obj_path, gboolean emit_signal);
-static void on_device_added(DBusGProxy* proxy, const char* obj_path, gpointer user_data);
-static void on_device_removed(DBusGProxy* proxy, const char* obj_path, gpointer user_data);
-static void on_device_changed(DBusGProxy* proxy, const char* obj_path, gpointer user_data);
+static GUDisksVolume* add_volume(GUDisksVolumeMonitor* mon, const char* obj_path,
+ GUDisksDrive* drv, gboolean emit_signal);
+static void remove_volume(GUDisksVolumeMonitor* mon, const char* obj_path);
+
+static void on_volume_changed(GUDisksVolume* vol, GUDisksVolumeMonitor* mon);
+static void on_mount_preunmount(GUDisksMount* mnt, GUDisksVolumeMonitor* mon);
+static void on_mount_removed(GUDisksMount* mnt, GUDisksVolumeMonitor* mon);
+static void on_drive_changed(GUDisksDrive* drv, GUDisksVolumeMonitor* mon);
-static GList* find_device_l(GUDisksVolumeMonitor* mon, const char* obj_path);
-static GList* find_drive_l(GUDisksVolumeMonitor* mon, GUDisksDevice* dev);
-static GList* find_volume_l(GUDisksVolumeMonitor* mon, GUDisksDevice* dev);
+static GList* find_volume_l(GUDisksVolumeMonitor* mon, const char* obj_path);
+static GList* find_drive_l(GUDisksVolumeMonitor* mon, const char* obj_path);
-static inline GUDisksDevice* find_device(GUDisksVolumeMonitor* mon, const char* obj_path)
+static inline GUDisksVolume* find_volume(GUDisksVolumeMonitor* mon, const char* obj_path)
{
- GList* l = find_device_l(mon, obj_path);
- return l ? G_UDISKS_DEVICE(l->data) : NULL;
+ GList* l = find_volume_l(mon, obj_path);
+ return l ? G_UDISKS_VOLUME(l->data) : NULL;
}
-static inline GUDisksDrive* find_drive(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
+static inline GUDisksDrive* find_drive(GUDisksVolumeMonitor* mon, const char* obj_path)
{
- GList* l = find_drive_l(mon, dev);
+ GList* l = find_drive_l(mon, obj_path);
return l ? G_UDISKS_DRIVE(l->data) : NULL;
}
-static inline GUDisksVolume* find_volume(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
+/* callback when new device or drive added or removed */
+static void on_g_signal(GDBusProxy *proxy, char *sender_name, char *signal_name,
+ GVariant *parameters, gpointer user_data)
{
- GList* l = find_volume_l(mon, dev);
- return l ? G_UDISKS_VOLUME(l->data) : NULL;
+ GUDisksVolumeMonitor* mon = G_UDISKS_VOLUME_MONITOR(user_data);
+
+ if (!g_variant_is_container(parameters) || g_variant_n_children(parameters) < 2)
+ {
+ // error, should be either '(oas)' or '(oa{sa{sv}})'
+ return;
+ }
+
+ GVariant *target = g_variant_get_child_value(parameters, 0);
+ GVariant *ifaces = g_variant_get_child_value(parameters, 1);
+
+ if (!g_variant_is_container(ifaces) || !g_variant_is_of_type(target, G_VARIANT_TYPE_OBJECT_PATH))
+ {
+ // should never happen
+ }
+ else if (strcmp(signal_name, "InterfacesAdded") == 0)
+ {
+ const char* obj_path = g_variant_get_string(target, NULL);
+ GVariant *test = g_variant_lookup_value(ifaces,
+ "org.freedesktop.UDisks2.Drive", NULL);
+ if (test)
+ {
+ /* appears to be a drive itself */
+ add_drive(mon, obj_path, TRUE);
+ g_variant_unref(test);
+ }
+ else if ((test = g_variant_lookup_value(ifaces,
+ "org.freedesktop.UDisks2.Block", NULL)))
+ {
+ GVariant* drv_obj_var = g_variant_lookup_value(test, "Drive", NULL);
+ GUDisksDrive *drv = find_drive(mon, g_variant_get_string(drv_obj_var, NULL));
+ g_variant_unref(test);
+ test = g_variant_lookup_value(ifaces,
+ "org.freedesktop.UDisks2.PartitionTable", NULL);
+ if (test)
+ {
+ /* it's a drive, search for it and set this device for it */
+ g_variant_unref(test);
+ if (drv)
+ {
+ g_udisks_drive_set_device_path(drv, obj_path, mon->con,
+ mon->cancellable, NULL);
+ /* FIXME: this is useless unless we support burn:/// */
+ if (g_udisks_drive_is_disc_blank(drv))
+ add_volume(mon, obj_path, drv, TRUE);
+ }
+ }
+ test = g_variant_lookup_value(ifaces,
+ "org.freedesktop.UDisks2.Filesystem", NULL);
+ if (test)
+ {
+ /* it's a volume, just add it, it will update itself */
+ g_variant_unref(test);
+ add_volume(mon, obj_path, drv, TRUE);
+ }
+ g_variant_unref(drv_obj_var);
+ }
+ }
+ else if (strcmp(signal_name, "InterfacesRemoved") == 0)
+ {
+ GVariantIter iter;
+ char *val;
+ g_variant_iter_init(&iter, ifaces);
+ while (g_variant_iter_next(&iter, "s", &val))
+ {
+ if (strcmp(val, "org.freedesktop.UDisks2.Drive") == 0)
+ remove_drive(mon, g_variant_get_string(target, NULL));
+ else if (strcmp(val, "org.freedesktop.UDisks2.Block") == 0)
+ remove_volume(mon, g_variant_get_string(target, NULL));
+ g_free(val);
+ }
+ }
+ else
+ {
+ // shoudl never happen!
+ }
+ g_variant_unref(target);
+ g_variant_unref(ifaces);
}
@@ -122,16 +216,16 @@ static void g_udisks_volume_monitor_class_init(GUDisksVolumeMonitorClass *klass)
sig_drive_connected = g_signal_lookup("drive-connected", G_TYPE_VOLUME_MONITOR);
sig_drive_disconnected = g_signal_lookup("drive-disconnected", G_TYPE_VOLUME_MONITOR);
sig_drive_eject_button = g_signal_lookup("drive-eject-button", G_TYPE_VOLUME_MONITOR);
+ sig_drive_stop_button = g_signal_lookup("drive-stop-button", G_TYPE_VOLUME_MONITOR);
sig_mount_added = g_signal_lookup("mount-added", G_TYPE_VOLUME_MONITOR);
sig_mount_changed = g_signal_lookup("mount-changed", G_TYPE_VOLUME_MONITOR);
- sig_mount_premount = g_signal_lookup("mount-premount", G_TYPE_VOLUME_MONITOR);
+ sig_mount_preunmount = g_signal_lookup("mount-pre-unmount", G_TYPE_VOLUME_MONITOR);
sig_mount_removed = g_signal_lookup("mount-removed", G_TYPE_VOLUME_MONITOR);
sig_volume_added = g_signal_lookup("volume-added", G_TYPE_VOLUME_MONITOR);
sig_volume_changed = g_signal_lookup("volume-changed", G_TYPE_VOLUME_MONITOR);
sig_volume_removed = g_signal_lookup("volume-removed", G_TYPE_VOLUME_MONITOR);
}
-
static void g_udisks_volume_monitor_finalize(GObject *object)
{
GUDisksVolumeMonitor *self;
@@ -141,99 +235,247 @@ static void g_udisks_volume_monitor_finalize(GObject *object)
self = G_UDISKS_VOLUME_MONITOR(object);
- if(self->idle_handler)
+ if(self->cancellable)
{
- GList* l;
- g_source_remove(self->idle_handler);
- for(l = self->queued_events; l; l=l->next)
- {
- QueuedEvent* q = (QueuedEvent*)l->data;
- g_object_unref(q->dev);
- g_slice_free(QueuedEvent, q);
- }
- g_list_free(self->queued_events);
+ g_cancellable_cancel(self->cancellable);
+ g_object_unref(self->cancellable);
}
if(self->udisks_proxy)
{
- dbus_g_proxy_disconnect_signal(self->udisks_proxy, "DeviceAdded", G_CALLBACK(on_device_added), self);
- dbus_g_proxy_disconnect_signal(self->udisks_proxy, "DeviceRemoved", G_CALLBACK(on_device_removed), self);
- dbus_g_proxy_disconnect_signal(self->udisks_proxy, "DeviceChanged", G_CALLBACK(on_device_changed), self);
+ g_signal_handlers_disconnect_by_func(self->udisks_proxy,
+ G_CALLBACK(on_g_signal), self);
g_object_unref(self->udisks_proxy);
}
- if(self->devices)
+ while(self->volumes)
{
- g_list_foreach(self->devices, (GFunc)g_object_unref, NULL);
- g_list_free(self->devices);
- }
-
- if(self->drives)
- {
- g_list_foreach(self->drives, (GFunc)g_object_unref, NULL);
- g_list_free(self->drives);
+ GList *mnts;
+ GUDisksVolume *vol = self->volumes->data;
+ g_signal_handlers_disconnect_by_func(vol, G_CALLBACK(on_volume_changed), self);
+ mnts = g_udisks_volume_get_mounts(vol);
+ while(mnts)
+ {
+ /* is that ever possible? disconnect all its mounts handlers */
+ g_signal_handlers_disconnect_by_func(mnts->data, G_CALLBACK(on_mount_preunmount), self);
+ g_signal_handlers_disconnect_by_func(mnts->data, G_CALLBACK(on_mount_removed), self);
+ mnts = g_list_delete_link(mnts, mnts);
+ }
+ g_object_unref(self->volumes->data);
+ self->volumes = g_list_delete_link(self->volumes, self->volumes);
}
- if(self->volumes)
+ while(self->drives)
{
- g_list_foreach(self->volumes, (GFunc)g_object_unref, NULL);
- g_list_free(self->volumes);
+ g_signal_handlers_disconnect_by_func(self->drives->data,
+ G_CALLBACK(on_drive_changed), self);
+ g_udisks_drive_disconnected(self->drives->data);
+ g_object_unref(self->drives->data);
+ self->drives = g_list_delete_link(self->drives, self->drives);
}
G_OBJECT_CLASS(g_udisks_volume_monitor_parent_class)->finalize(object);
}
-static void update_volume_drive(GUDisksVolume* vol, GUDisksVolumeMonitor* mon)
+/* second phase of initialization: block devices scanned, add them and start monitoring */
+static void do_introspection(GUDisksVolumeMonitor *mon, const char *obj_path,
+ void (*process)(GDBusNodeInfo *, const char *, GUDisksVolumeMonitor *, gpointer),
+ gpointer pdata)
{
- /* set association between drive and volumes here */
- GUDisksDevice* dev;
- if(vol->dev->is_drive) /* it's a drive itself (cdrom is an example) */
- dev = vol->dev;
- else if(vol->dev->partition_slave)
- dev = find_device(mon, vol->dev->partition_slave);
- else
- dev = NULL;
+ GVariant *res;
+ GError *error = NULL;
+
+ res = g_dbus_connection_call_sync(mon->con, "org.freedesktop.UDisks2",
+ obj_path,
+ "org.freedesktop.DBus.Introspectable",
+ "Introspect", NULL, G_VARIANT_TYPE("(s)"),
+ G_DBUS_CALL_FLAGS_NONE, -1,
+ mon->cancellable, &error);
- /* no ref_count handling is needed. volume manager owns all the objects. */
- if(dev)
+ /* parse result */
+ if (!error)
{
- GUDisksDrive* drv = find_drive(mon, dev);
- vol->drive = drv;
+ GVariant *xml = g_variant_get_child_value(res, 0);
+ GDBusNodeInfo *info = g_dbus_node_info_new_for_xml(g_variant_get_string(xml, NULL),
+ &error);
+
+ if (error)
+ {
+ g_warning("Udisks2 introspection bad result: %s", error->message);
+ g_error_free(error);
+ }
+ else
+ {
+ process(info, obj_path, mon, pdata);
+ g_dbus_node_info_unref(info);
+ }
+ g_variant_unref(xml);
+ g_variant_unref(res);
}
else
- vol->drive = NULL;
+ {
+ g_warning("Udisks2 introspection failed: %s", error->message);
+ g_error_free(error);
+ }
}
-static void g_udisks_volume_monitor_init(GUDisksVolumeMonitor *self)
+static void process_drives_introspect(GDBusNodeInfo *info, const char *obj_path,
+ GUDisksVolumeMonitor *mon, gpointer pdata)
{
- self->con = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
- if(self->con)
+ GDBusNodeInfo **sub;
+ GString *str = g_string_new(obj_path);
+ gsize len;
+
+ g_string_append_c(str, '/');
+ len = str->len;
+ for (sub = info->nodes; sub && sub[0]; sub++)
{
- GPtrArray* ret;
- /* FIXME: handle disconnecting from dbus */
- self->udisks_proxy = dbus_g_proxy_new_for_name(self->con, "org.freedesktop.UDisks", "/org/freedesktop/UDisks", "org.freedesktop.UDisks");
+ g_string_append(str, sub[0]->path);
+ add_drive(mon, str->str, FALSE);
+ g_string_truncate(str, len);
+ }
+ g_string_free(str, TRUE);
+}
+
+static void process_a_device_introspect(GDBusNodeInfo *info, const char *obj_path,
+ GUDisksVolumeMonitor *mon, gpointer unused)
+{
+ GDBusInterfaceInfo **interfaces = info->interfaces;
+ gboolean has_fs = FALSE, has_pt = FALSE;
+ char *drv_obj_path = NULL;
+ gboolean is_sys_internal = FALSE, is_hidden = FALSE;
+ GUDisksDrive *drv = NULL;
+ GVariant *res, *sub;
+ GError *err = NULL;
+
+ //call org.freedesktop.DBus.Properties for "Drive" to get drive obj_path
+ res = g_dbus_connection_call_sync(mon->con, "org.freedesktop.UDisks2",
+ obj_path,
+ "org.freedesktop.DBus.Properties", "GetAll",
+ g_variant_new ("(s)", "org.freedesktop.UDisks2.Block"),
+ G_VARIANT_TYPE("(a{sv})"),
+ G_DBUS_CALL_FLAGS_NONE, -1,
+ mon->cancellable, &err);
+
+ if (err)
+ {
+ g_debug("GetAll for %s failed: %s",obj_path,err->message);
+ g_error_free(err);
+ return; // Failure;
+ }
- if(org_freedesktop_UDisks_enumerate_devices(self->udisks_proxy, &ret, NULL))
- {
- guint i;
- char** paths = (char**)ret->pdata;
- for(i=0; i<ret->len;++i)
- add_device(self, self->udisks_proxy, paths[i], FALSE);
- g_ptr_array_free(ret, TRUE);
- }
+ sub = g_variant_get_child_value(res, 0);
+ g_variant_unref(res);
+
+ if (!sub || !g_variant_is_container(sub))
+ {
+ g_debug("%p is not a container",sub);
+ return; // Failure;
+ }
- dbus_g_proxy_add_signal(self->udisks_proxy, "DeviceAdded", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
- dbus_g_proxy_add_signal(self->udisks_proxy, "DeviceRemoved", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
- dbus_g_proxy_add_signal(self->udisks_proxy, "DeviceChanged", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
+ g_variant_lookup(sub, "Drive", "o", &drv_obj_path);
+ g_variant_lookup(sub, "HintIgnore", "b", &is_hidden);
+ g_variant_lookup(sub, "HintSystem", "b", &is_sys_internal);
- dbus_g_proxy_connect_signal(self->udisks_proxy, "DeviceAdded", G_CALLBACK(on_device_added), self, NULL);
- dbus_g_proxy_connect_signal(self->udisks_proxy, "DeviceRemoved", G_CALLBACK(on_device_removed), self, NULL);
- dbus_g_proxy_connect_signal(self->udisks_proxy, "DeviceChanged", G_CALLBACK(on_device_changed), self, NULL);
+ /* FIXME: how should we treat sys internal devices?
+ * make this optional */
+ if(is_hidden || (is_sys_internal && !fm_config->show_internal_volumes))
+ goto out;
- /* find drives for volumes */
- if(self->volumes && self->drives)
- g_list_foreach(self->volumes, (GFunc)update_volume_drive, self);
+ drv = find_drive(mon, drv_obj_path);
+ if(!drv)
+ goto out;
+ while (*interfaces)
+ {
+ if (g_strcmp0((*interfaces)->name, "org.freedesktop.UDisks2.Filesystem") == 0)
+ has_fs = TRUE;
+ else if (drv && g_strcmp0((*interfaces)->name, "org.freedesktop.UDisks2.PartitionTable") == 0)
+ has_pt = TRUE;
+ interfaces++;
}
+
+ if (has_fs)
+ {
+ add_volume(mon, obj_path, drv, TRUE);
+ }
+ if (has_pt)
+ {
+ g_udisks_drive_set_device_path(drv, obj_path, mon->con, mon->cancellable, NULL);
+ /* also treat blank optical discs as volumes here to be compatible with gvfs.
+ * FIXME: this is useless unless we support burn:///
+ * [PCMan] So, should we support this? Personally I think it's a bad idea. */
+ if (g_udisks_drive_is_disc_blank(drv))
+ add_volume(mon, obj_path, drv, FALSE);
+ }
+out:
+ g_variant_unref(sub);
+ g_free(drv_obj_path);
+}
+
+static void process_devices_introspect(GDBusNodeInfo *info, const char *obj_path,
+ GUDisksVolumeMonitor *mon, gpointer pdata)
+{
+ GDBusNodeInfo **sub;
+ GString *str = g_string_new(obj_path);
+ gsize len;
+
+ g_string_append_c(str, '/');
+ len = str->len;
+ for (sub = info->nodes; sub && sub[0]; sub++)
+ {
+ g_string_append(str, sub[0]->path);
+ do_introspection(mon, str->str, &process_a_device_introspect, NULL);
+ g_string_truncate(str, len);
+ }
+ g_string_free(str, TRUE);
+}
+
+/* first phase of initialization: DBus connected */
+static void on_dbus_connected(GObject *source_object, GAsyncResult *result,
+ gpointer user_data)
+{
+ GUDisksVolumeMonitor *mon = G_UDISKS_VOLUME_MONITOR(user_data);
+ GError *error = NULL;
+
+ mon->con = g_bus_get_finish(result, &error);
+ if (!error)
+ {
+ /* collect drives */
+ const char *path = "/org/freedesktop/UDisks2/drives";
+ do_introspection(mon, path, &process_drives_introspect, NULL);
+
+ /* collect devices */
+ path = "/org/freedesktop/UDisks2/block_devices";
+ do_introspection(mon, path, &process_devices_introspect, NULL);
+
+ /* add a monitor */
+ mon->udisks_proxy = g_dbus_proxy_new_sync(mon->con,
+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
+ NULL, "org.freedesktop.UDisks2",
+ "/org/freedesktop/UDisks2",
+ "org.freedesktop.DBus.ObjectManager",
+ mon->cancellable, &error);
+ if (!error)
+ {
+ g_signal_connect(mon->udisks_proxy, "g-signal", G_CALLBACK(on_g_signal), mon);
+ }
+ else
+ {
+ g_warning("Udisks2 ObjectManager proxy failed: %s", error->message);
+ g_error_free(error);
+ }
+ }
+ else
+ {
+ g_warning("Cannot connect DBus: %s", error->message);
+ g_error_free(error);
+ }
+}
+
+static void g_udisks_volume_monitor_init(GUDisksVolumeMonitor *self)
+{
+ self->cancellable = g_cancellable_new();
+ g_bus_get(G_BUS_TYPE_SYSTEM, self->cancellable, on_dbus_connected, self);
}
@@ -276,12 +518,12 @@ GList* get_mounts(GVolumeMonitor *mon)
GUDisksVolumeMonitor* umon = G_UDISKS_VOLUME_MONITOR(mon);
GList* l;
GList* mnts = NULL;
- for(l = umon->volumes; l; l=l->next)
+
+ for (l = umon->volumes; l; l = l->next)
{
- GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- if(vol->mount)
- mnts = g_list_prepend(mnts, g_object_ref(vol->mount));
+ mnts = g_list_concat(g_udisks_volume_get_mounts(l->data), mnts);
}
+ g_list_foreach(mnts, (GFunc)g_object_ref, NULL);
return mnts;
}
@@ -291,9 +533,12 @@ GVolume *get_volume_for_uuid(GVolumeMonitor *mon, const char *uuid)
GList* l;
for(l = umon->volumes; l; l=l->next)
{
- GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- if(g_strcmp0(vol->dev->uuid, uuid) == 0)
- return (GVolume*)g_object_ref(vol);
+ GVolume *vol = l->data;
+ char *dev_uuid = g_volume_get_uuid(vol);
+ int res = g_strcmp0(dev_uuid, uuid);
+ g_free(dev_uuid);
+ if (res == 0)
+ return g_object_ref(vol);
}
return NULL;
}
@@ -304,9 +549,12 @@ GMount *get_mount_for_uuid(GVolumeMonitor *mon, const char *uuid)
GList* l;
for(l = umon->volumes; l; l=l->next)
{
- GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- if(g_strcmp0(vol->dev->uuid, uuid) == 0)
- return g_volume_get_mount(G_VOLUME(vol));
+ GVolume *vol = l->data;
+ char *dev_uuid = g_volume_get_uuid(vol);
+ int res = g_strcmp0(dev_uuid, uuid);
+ g_free(dev_uuid);
+ if (res == 0)
+ return g_volume_get_mount(vol);
}
return NULL;
}
@@ -319,278 +567,145 @@ void drive_eject_button(GVolumeMonitor *mon, GDrive *drive)
}
-GList* find_device_l(GUDisksVolumeMonitor* mon, const char* obj_path)
+GList* find_volume_l(GUDisksVolumeMonitor* mon, const char* obj_path)
{
GList* l;
- for(l = mon->devices; l; l=l->next)
+ for(l = mon->volumes; l; l=l->next)
{
- GUDisksDevice* dev = G_UDISKS_DEVICE(l->data);
- if(g_strcmp0(dev->obj_path, obj_path) == 0)
+ if(g_strcmp0(g_udisks_volume_get_obj_path(l->data), obj_path) == 0)
return l;
}
return NULL;
}
-GList* find_drive_l(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
+GList* find_drive_l(GUDisksVolumeMonitor* mon, const char* obj_path)
{
GList* l;
for(l = mon->drives; l; l=l->next)
{
- GUDisksDrive* drv = G_UDISKS_DRIVE(l->data);
- if(G_UNLIKELY(drv->dev == dev))
- return l;
- }
- return NULL;
-}
-
-GList* find_volume_l(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
-{
- GList* l;
- for(l = mon->volumes; l; l=l->next)
- {
- GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- if(G_UNLIKELY(vol->dev == dev))
+ if(g_strcmp0(g_udisks_drive_get_obj_path(l->data), obj_path) == 0)
return l;
}
return NULL;
}
-static void add_drive(GUDisksVolumeMonitor* mon, GUDisksDevice* dev, gboolean emit_signal)
+static GUDisksDrive *add_drive(GUDisksVolumeMonitor* mon, const char *obj_path,
+ gboolean emit_signal)
{
- if(!find_drive(mon, dev))
+ GUDisksDrive *drv = find_drive(mon, obj_path);
+ if (!drv)
{
- GUDisksDrive* drv = g_udisks_drive_new(mon, dev);
+ drv = g_udisks_drive_new(mon->con, obj_path, mon->cancellable, NULL); // FIXME
+ g_signal_connect(drv, "changed", G_CALLBACK(on_drive_changed), mon);
mon->drives = g_list_prepend(mon->drives, drv);
if(emit_signal)
g_signal_emit(mon, sig_drive_connected, 0, drv);
}
+ return drv;
}
-static void add_volume(GUDisksVolumeMonitor* mon, GUDisksDevice* dev, gboolean emit_signal)
+static void remove_drive(GUDisksVolumeMonitor* mon, const char *obj_path)
{
- if(!find_volume(mon, dev))
- {
- GUDisksVolume* vol = g_udisks_volume_new(mon, dev);
- mon->volumes = g_list_prepend(mon->volumes, vol);
- if(emit_signal)
- g_signal_emit(mon, sig_volume_added, 0, vol);
- }
-}
-
-static void remove_drive(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
-{
- GList* l = find_drive_l(mon, dev);
+ GList* l = find_drive_l(mon, obj_path);
+ g_debug("remove_drive: %s", obj_path);
if(l)
{
GUDisksDrive* drv = G_UDISKS_DRIVE(l->data);
mon->drives = g_list_delete_link(mon->drives, l);
+ g_signal_handlers_disconnect_by_func(drv, G_CALLBACK(on_drive_changed), mon);
g_signal_emit(mon, sig_drive_disconnected, 0, drv);
g_udisks_drive_disconnected(drv);
- drv->mon = NULL;
- for(l = mon->volumes; l; l=l->next)
- {
- GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- if(vol->drive == drv)
- {
- vol->drive = NULL;
- /* FIXME: emit sigal for volume change */
- }
- }
g_object_unref(drv);
}
}
-static void remove_volume(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
+static void on_mount_preunmount(GUDisksMount* mnt, GUDisksVolumeMonitor* mon)
{
- GList* l = find_volume_l(mon, dev);
- if(l)
- {
- GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- mon->volumes = g_list_delete_link(mon->volumes, l);
- g_signal_emit(mon, sig_volume_removed, 0, vol);
- g_udisks_volume_removed(vol);
- vol->mon = NULL;
- vol->drive = NULL;
- g_object_unref(vol);
- }
+ g_debug("%s",__func__);
+ g_signal_emit(mon, sig_mount_preunmount, 0, mnt);
}
-static void _g_udisks_device_added(GUDisksDevice* dev, GUDisksVolumeMonitor* mon, gboolean emit_signal)
+static void on_mount_removed(GUDisksMount* mnt, GUDisksVolumeMonitor* mon)
{
- /* FIXME: how should we treat sys internal devices?
- * make this optional */
- if(!dev->is_hidden && (!dev->is_sys_internal || fm_config->show_internal_volumes) )
- {
- if(dev->is_drive)
- add_drive(mon, dev, emit_signal);
-
- if(g_udisks_device_is_volume(dev))
- add_volume(mon, dev, emit_signal);
- }
+ g_debug("%s",__func__);
+ /* remove handlers */
+ g_signal_handlers_disconnect_by_func(mnt, G_CALLBACK(on_mount_preunmount), mon);
+ g_signal_handlers_disconnect_by_func(mnt, G_CALLBACK(on_mount_removed), mon);
+ g_signal_emit(mon, sig_mount_removed, 0, mnt);
}
-static void g_udisks_device_added(GUDisksDevice* dev, GUDisksVolumeMonitor* mon)
+static void on_mount_added(GUDisksVolume* vol, GUDisksMount* mnt, GUDisksVolumeMonitor* mon)
{
- g_debug("g_udisks_device_added");
- _g_udisks_device_added(dev, mon, TRUE);
+ g_debug("%s",__func__);
+ /* add handlers */
+ g_signal_connect(mnt, "pre-unmount", G_CALLBACK(on_mount_preunmount), mon);
+ g_signal_connect(mnt, "unmounted", G_CALLBACK(on_mount_removed), mon);
+ g_signal_emit(mon, sig_mount_added, 0, mnt);
}
-static void g_udisks_device_changed(GUDisksDevice* dev, GUDisksVolumeMonitor* mon)
+static void on_drive_changed(GUDisksDrive* drv, GUDisksVolumeMonitor* mon)
{
- GUDisksDrive* drv = find_drive(mon, dev);
- GUDisksVolume* vol = find_volume(mon, dev);
- /*
- gboolean is_drive = dev->is_drive;
- char* usage = g_strdup(dev->usage);
- */
- g_debug("g_udisks_device_changed");
- if(drv)
- {
- g_signal_emit(mon, sig_drive_changed, 0, drv);
- g_udisks_drive_changed(drv);
- /* it's no longer a drive */
- if(!dev->is_drive)
- remove_drive(mon, dev);
- }
- else
- {
- if(dev->is_drive)
- add_drive(mon, dev, TRUE);
- }
+ g_debug("on_drive_changed: %s",g_udisks_drive_get_obj_path(drv));
- if(vol)
- {
- update_volume_drive(vol, mon);
- g_signal_emit(mon, sig_volume_changed, 0, vol);
- g_udisks_volume_changed(vol);
-
- /* it's no longer a volume */
- if(!g_udisks_device_is_volume(dev))
- remove_volume(mon, dev);
- }
- else
- {
- /* we got a usable volume now */
- if(g_udisks_device_is_volume(dev))
- add_volume(mon, dev, TRUE);
- }
+ g_signal_emit(mon, sig_drive_changed, 0, drv);
}
-static void g_udisks_device_removed(GUDisksDevice* dev, GUDisksVolumeMonitor* mon)
+static void on_volume_changed(GUDisksVolume* vol, GUDisksVolumeMonitor* mon)
{
- g_debug("g_udisks_device_removed");
-
- if(dev->is_drive)
- remove_drive(mon, dev);
-
- remove_volume(mon, dev);
+ g_debug("%s", __func__);
+ g_signal_emit(mon, sig_volume_changed, 0, vol);
}
-static gboolean on_idle(GUDisksVolumeMonitor* mon)
+static GUDisksVolume* add_volume(GUDisksVolumeMonitor* mon, const char* obj_path,
+ GUDisksDrive* drv, gboolean emit_signal)
{
- GList* l;
- g_debug("on_idle: %d", g_list_length(mon->queued_events));
- for(l = mon->queued_events; l; l=l->next)
+ if(mon && obj_path && drv && !find_volume(mon, obj_path))
{
- QueuedEvent* q = (QueuedEvent*)l->data;
- q->func(q->dev, mon);
- g_object_unref(q->dev);
- g_slice_free(QueuedEvent, q);
- }
- g_list_free(mon->queued_events);
- mon->queued_events = NULL;
- mon->idle_handler = 0;
- return FALSE;
-}
-
-static void g_udisks_device_queue_event(GUDisksDevice* dev, GUDisksDeviceEventHandler func, GUDisksVolumeMonitor* mon)
-{
- QueuedEvent* q = g_slice_new(QueuedEvent);
- q->dev = g_object_ref(dev);
- q->func = func;
- mon->queued_events = g_list_append(mon->queued_events, q);
-
- if(0 == mon->idle_handler)
- mon->idle_handler = g_idle_add_full(G_PRIORITY_HIGH, (GSourceFunc)on_idle, mon, NULL);
-}
-
-static void add_device(GUDisksVolumeMonitor* mon, DBusGProxy* proxy, const char* obj_path, gboolean emit_signal)
-{
- if(!find_device(mon, obj_path))
- {
- DBusGProxy *dev_proxy = dbus_g_proxy_new_for_name(mon->con,
- "org.freedesktop.UDisks",
- obj_path,
- "org.freedesktop.DBus.Properties");
GError* err = NULL;
- GHashTable* props = dbus_get_all_props(dev_proxy, "org.freedesktop.UDisks.Device", &err);
- if(props)
+ GUDisksVolume* vol = g_udisks_volume_new(obj_path, mon->con, NULL, drv,
+ mon->cancellable, &err);
+
+ if (!err)
{
- GUDisksDevice* dev = g_udisks_device_new(obj_path, props);
- g_hash_table_destroy(props);
-
- mon->devices = g_list_prepend(mon->devices, dev);
- if(emit_signal)
- g_udisks_device_queue_event(dev, g_udisks_device_added, mon);
- else
- _g_udisks_device_added(dev, mon, FALSE);
+ g_debug("added new volume for %s", obj_path);
+ mon->volumes = g_list_prepend(mon->volumes, vol);
+ g_signal_connect(vol, "changed", G_CALLBACK(on_volume_changed), mon);
+ g_signal_connect(vol, "mount-added", G_CALLBACK(on_mount_added), mon);
+ if (emit_signal)
+ g_signal_emit(mon, sig_volume_added, 0, vol);
+ return vol;
}
else
{
g_debug("%s", err->message);
g_error_free(err);
}
- g_object_unref(dev_proxy);
}
- g_debug("device_added: %s", obj_path);
-}
-
-void on_device_added(DBusGProxy* proxy, const char* obj_path, gpointer user_data)
-{
- GUDisksVolumeMonitor* mon = G_UDISKS_VOLUME_MONITOR(user_data);
- add_device(mon, proxy, obj_path, TRUE);
+ return NULL;
}
-
-void on_device_removed(DBusGProxy* proxy, const char* obj_path, gpointer user_data)
+static void remove_volume(GUDisksVolumeMonitor* mon, const char* obj_path)
{
- GUDisksVolumeMonitor* mon = G_UDISKS_VOLUME_MONITOR(user_data);
- GList* l;
- l = find_device_l(mon, obj_path);
+ GList *l, *mnts;
+ l = find_volume_l(mon, obj_path);
if(l)
{
- GUDisksDevice* dev = G_UDISKS_DEVICE(l->data);
- mon->devices = g_list_delete_link(mon->devices, l);
-
- g_udisks_device_queue_event(dev, g_udisks_device_removed, mon);
- g_object_unref(dev);
- }
- g_debug("device_removed: %s", obj_path);
-
-}
-
-void on_device_changed(DBusGProxy* proxy, const char* obj_path, gpointer user_data)
-{
- GUDisksVolumeMonitor* mon = G_UDISKS_VOLUME_MONITOR(user_data);
- GUDisksDevice* dev = find_device(mon, obj_path);
- if(dev)
- {
- DBusGProxy *dev_proxy = dbus_g_proxy_new_for_name(mon->con,
- "org.freedesktop.UDisks",
- obj_path,
- "org.freedesktop.DBus.Properties");
+ GUDisksVolume* vol = G_UDISKS_VOLUME(l->data);
- GError* err = NULL;
- GHashTable* props = dbus_get_all_props(dev_proxy, "org.freedesktop.UDisks.Device", &err);
- if(props)
+ g_signal_handlers_disconnect_by_func(vol, G_CALLBACK(on_volume_changed), mon);
+ g_signal_handlers_disconnect_by_func(vol, G_CALLBACK(on_mount_added), mon);
+ mon->volumes = g_list_delete_link(mon->volumes, l);
+ mnts = g_udisks_volume_get_mounts(vol);
+ while(mnts)
{
- g_udisks_device_update(dev, props);
- g_hash_table_destroy(props);
-
- g_udisks_device_queue_event(dev, g_udisks_device_changed, mon);
+ /* is that ever possible? disconnect all its mounts handlers */
+ g_signal_handlers_disconnect_by_func(mnts->data, G_CALLBACK(on_mount_preunmount), mon);
+ g_signal_handlers_disconnect_by_func(mnts->data, G_CALLBACK(on_mount_removed), mon);
+ mnts = g_list_delete_link(mnts, mnts);
}
- g_object_unref(dev_proxy);
+ g_signal_emit(mon, sig_volume_removed, 0, vol);
+ g_udisks_volume_removed(vol);
+ g_object_unref(vol);
}
- g_debug("device_changed: %s", obj_path);
+ g_debug("volume_removed: %s", obj_path);
}
-
diff --git a/src/udisks/g-udisks-volume-monitor.h b/src/udisks/g-udisks-volume-monitor.h
index a64f35b7..035914cf 100644
--- a/src/udisks/g-udisks-volume-monitor.h
+++ b/src/udisks/g-udisks-volume-monitor.h
@@ -24,7 +24,6 @@
#define __G_UDISKS_VOLUME_MONITOR_H__
#include <gio/gio.h>
-#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
@@ -41,19 +40,6 @@ G_BEGIN_DECLS
typedef struct _GUDisksVolumeMonitor GUDisksVolumeMonitor;
typedef struct _GUDisksVolumeMonitorClass GUDisksVolumeMonitorClass;
-struct _GUDisksVolumeMonitor
-{
- GNativeVolumeMonitor parent;
- DBusGConnection* con;
- DBusGProxy* udisks_proxy;
-
- GList* devices;
- GList* drives;
- GList* volumes;
- guint idle_handler;
- GList* queued_events;
-};
-
struct _GUDisksVolumeMonitorClass
{
GNativeVolumeMonitorClass parent_class;
diff --git a/src/udisks/g-udisks-volume.c b/src/udisks/g-udisks-volume.c
index a1a4a98f..38500579 100644
--- a/src/udisks/g-udisks-volume.c
+++ b/src/udisks/g-udisks-volume.c
@@ -1,6 +1,7 @@
// g-udisks-volume.c
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,34 +22,53 @@
#include <config.h>
#endif
-#include "g-udisks-volume.h"
#include <glib/gi18n-lib.h>
-#include <string.h>
-#include "udisks.h"
-#include "udisks-device.h"
#include "g-udisks-mount.h"
+#include "g-udisks-drive.h"
#include "dbus-utils.h"
+#include <string.h>
+
+struct _GUDisksVolume
+{
+ GObject parent;
+ GUDisksDevice* dev;
+ GUDisksDrive* drv;
+ char* name;
+ GList* mounts; /* of GUDisksMount */
+ GFile* activation_root;
+};
+
+struct _GUDisksVolumeClass
+{
+ GObjectClass parent_class;
+ void (*mount_added)(GUDisksDevice* dev, GUDisksMount* mnt);
+};
+
typedef struct
{
GUDisksVolume* vol;
GAsyncReadyCallback callback;
gpointer user_data;
- DBusGProxy* proxy;
- DBusGProxyCall* call;
- GCancellable* cancellable;
}AsyncData;
static guint sig_changed;
static guint sig_removed;
+static guint sig_mount_added;
static void g_udisks_volume_volume_iface_init (GVolumeIface * iface);
static void g_udisks_volume_finalize (GObject *object);
static void g_udisks_volume_eject_with_operation (GVolume* base, GMountUnmountFlags flags, GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data);
+static gboolean g_udisks_volume_set_mounts(GUDisksVolume* vol, GUDisksDevice* dev);
-// static gboolean g_udisks_volume_eject_co (UdisksVolumeEjectData* data);
-// static gboolean g_udisks_volume_eject_with_operation_co (UdisksVolumeEjectWithOperationData* data);
+static void on_device_changed(GUDisksDevice* dev, GUDisksVolume* vol)
+{
+ g_free(vol->name);
+ vol->name = NULL;
+ g_udisks_volume_set_mounts(vol, dev);
+ g_signal_emit(vol, sig_changed, 0);
+}
G_DEFINE_TYPE_EXTENDED (GUDisksVolume, g_udisks_volume, G_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE (G_TYPE_VOLUME,
@@ -61,27 +81,13 @@ static void g_udisks_volume_class_init(GUDisksVolumeClass *klass)
g_object_class = G_OBJECT_CLASS(klass);
g_object_class->finalize = g_udisks_volume_finalize;
-}
-static void g_udisks_volume_clear(GUDisksVolume* vol)
-{
- if(vol->mount)
- {
- g_object_unref(vol->mount);
- vol->mount = NULL;
- }
-
- if(vol->icon)
- {
- g_object_unref(vol->icon);
- vol->icon = NULL;
- }
-
- if(vol->name)
- {
- g_free(vol->name);
- vol->name = NULL;
- }
+ sig_mount_added = g_signal_new("mount-added", G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GUDisksVolumeClass, mount_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, G_TYPE_OBJECT);
}
static void g_udisks_volume_finalize(GObject *object)
@@ -92,10 +98,26 @@ static void g_udisks_volume_finalize(GObject *object)
g_return_if_fail(G_IS_UDISKS_VOLUME(object));
self = G_UDISKS_VOLUME(object);
- if(self->dev)
- g_object_unref(self->dev);
- g_udisks_volume_clear(self);
+ g_signal_handlers_disconnect_by_func(self->dev, G_CALLBACK(on_device_changed), self);
+ g_object_unref(self->dev);
+
+ /* it should be already removed from drive at this point but let ensure that */
+ g_udisks_drive_del_volume(self->drv, self);
+ g_object_unref(self->drv);
+
+ while(self->mounts)
+ {
+ g_udisks_mount_unmounted(self->mounts->data);
+ g_object_unref(self->mounts->data);
+ self->mounts = g_list_delete_link(self->mounts, self->mounts);
+ }
+
+ if(self->activation_root)
+ g_object_unref(self->activation_root);
+
+ g_free(self->name);
+
G_OBJECT_CLASS(g_udisks_volume_parent_class)->finalize(object);
}
@@ -104,31 +126,45 @@ static void g_udisks_volume_init(GUDisksVolume *self)
}
+static gboolean on_idle_start(gpointer data)
+{
+ GUDisksVolume* vol = (GUDisksVolume*)data;
+ g_udisks_volume_set_mounts(vol, vol->dev);
+ g_object_unref(data);
+ return FALSE;
+}
-GUDisksVolume *g_udisks_volume_new(GUDisksVolumeMonitor* mon, GUDisksDevice* dev)
+GUDisksVolume *g_udisks_volume_new(const char* obj_path, GDBusConnection* con,
+ GFile* activation_root, GUDisksDrive* drv,
+ GCancellable* cancellable, GError** error)
{
GUDisksVolume* vol = (GUDisksVolume*)g_object_new(G_TYPE_UDISKS_VOLUME, NULL);
- vol->dev = g_object_ref(dev);
- vol->mon = mon;
+
+ vol->dev = g_udisks_device_get(obj_path, con, cancellable, error);
+ g_signal_connect(vol->dev, "changed", G_CALLBACK(on_device_changed), vol);
+ vol->drv = g_object_ref(drv);
+ g_udisks_drive_add_volume(drv, vol);
+ if (activation_root)
+ vol->activation_root = g_object_ref_sink(activation_root);
+ g_idle_add(on_idle_start, g_object_ref(vol));
return vol;
}
static gboolean g_udisks_volume_can_eject (GVolume* base)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- return vol->dev->is_ejectable;
+ return g_drive_can_eject(G_DRIVE(vol->drv));
}
static gboolean g_udisks_volume_can_mount (GVolume* base)
{
/* FIXME, is this correct? */
- GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- return !vol->dev->is_mounted;
+ //GUDisksVolume* vol = G_UDISKS_VOLUME(base);
+ return TRUE;
}
static void g_udisks_volume_eject (GVolume* base, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
- //GUDisksVolume* vol = G_UDISKS_VOLUME(base);
g_udisks_volume_eject_with_operation(base, flags, NULL, cancellable, callback, user_data);
}
@@ -151,20 +187,19 @@ static void on_drive_ejected(GObject* drive, GAsyncResult* res, gpointer user_da
static void g_udisks_volume_eject_with_operation (GVolume* base, GMountUnmountFlags flags, GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- if(vol->drive && g_drive_can_eject(G_DRIVE(vol->drive)))
+ if(g_drive_can_eject(G_DRIVE(vol->drv)))
{
EjectData* data = g_slice_new(EjectData);
data->vol = g_object_ref(vol);
data->callback = callback;
data->user_data = user_data;
- g_drive_eject_with_operation(G_DRIVE(vol->drive), flags, mount_operation,
+ g_drive_eject_with_operation(G_DRIVE(vol->drv), flags, mount_operation,
cancellable, on_drive_ejected, data);
}
}
static char** g_udisks_volume_enumerate_identifiers (GVolume* base)
{
- //GUDisksVolume* vol = G_UDISKS_VOLUME(base);
char** kinds = g_new0(char*, 4);
kinds[0] = g_strdup(G_VOLUME_IDENTIFIER_KIND_LABEL);
kinds[1] = g_strdup(G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
@@ -177,24 +212,21 @@ static GFile* g_udisks_volume_get_activation_root (GVolume* base)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
/* FIXME: is this corrcet? */
- return vol->mount ? g_mount_get_root((GMount*)vol->mount) : NULL;
+ if(vol->mounts)
+ return g_mount_get_root((GMount*)vol->mounts->data);
+ return vol->activation_root ? g_object_ref(vol->activation_root) : NULL;
}
static GDrive* g_udisks_volume_get_drive (GVolume* base)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- return vol->drive ? (GDrive*)g_object_ref(vol->drive) : NULL;
+ return g_object_ref(vol->drv);
}
static GIcon* g_udisks_volume_get_icon (GVolume* base)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- if(!vol->icon)
- {
- const char* icon_name = g_udisks_device_get_icon_name(vol->dev);
- vol->icon = g_themed_icon_new_with_default_fallbacks(icon_name);
- }
- return (GIcon*)g_object_ref(vol->icon);
+ return g_drive_get_icon(G_DRIVE(vol->drv));
}
static char* g_udisks_volume_get_identifier (GVolume* base, const char* kind)
@@ -203,11 +235,11 @@ static char* g_udisks_volume_get_identifier (GVolume* base, const char* kind)
if(kind)
{
if(strcmp(kind, G_VOLUME_IDENTIFIER_KIND_LABEL) == 0)
- return g_strdup(vol->dev->label);
+ return g_udisks_device_get_label(vol->dev);
else if(strcmp(kind, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE) == 0)
- return g_strdup(vol->dev->dev_file);
+ return g_udisks_device_get_dev_file(vol->dev);
else if(strcmp(kind, G_VOLUME_IDENTIFIER_KIND_UUID) == 0)
- return g_strdup(vol->dev->uuid);
+ return g_udisks_device_get_uuid(vol->dev);
}
return NULL;
}
@@ -215,26 +247,23 @@ static char* g_udisks_volume_get_identifier (GVolume* base, const char* kind)
static GMount* g_udisks_volume_get_mount (GVolume* base)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- if(vol->dev->is_mounted && !vol->mount)
- {
- /* FIXME: will this work? */
- vol->mount = g_udisks_mount_new(vol);
- }
- return vol->mount ? (GMount*)g_object_ref(vol->mount) : NULL;
+ return vol->mounts ? (GMount*)g_object_ref(vol->mounts->data) : NULL;
}
static char* g_udisks_volume_get_name (GVolume* base)
{
- /* TODO */
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
if(!vol->name)
{
- GUDisksDevice* dev = vol->dev;
/* build a human readable name */
/* FIXME: find a better way to build a nicer volume name */
- if(dev->label && *dev->label)
- vol->name = g_strdup(dev->label);
+ vol->name = g_udisks_device_get_label(vol->dev);
+ if(vol->name && !vol->name[0])
+ {
+ g_free(vol->name);
+ vol->name = NULL;
+ }
/*
else if(vol->dev->partition_size > 0)
{
@@ -243,14 +272,10 @@ static char* g_udisks_volume_get_name (GVolume* base)
g_free(size_str);
}
*/
- else if(dev->is_optic_disc)
- vol->name = g_strdup(g_udisks_device_get_disc_name(dev));
- else if(dev->dev_file_presentation && *dev->dev_file_presentation)
- vol->name = g_path_get_basename(dev->dev_file_presentation);
- else if(dev->dev_file && *dev->dev_file)
- vol->name = g_path_get_basename(vol->dev->dev_file);
- else
- vol->name = g_path_get_basename(vol->dev->obj_path);
+ if(!vol->name)
+ vol->name = g_strdup(g_udisks_drive_get_disc_name(vol->drv));
+ if(!vol->name)
+ vol->name = g_udisks_device_get_dev_basename(vol->dev);
}
return g_strdup(vol->name);
}
@@ -258,23 +283,20 @@ static char* g_udisks_volume_get_name (GVolume* base)
static char* g_udisks_volume_get_uuid (GVolume* base)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- return g_strdup(vol->dev->uuid);
+ return g_udisks_device_get_uuid(vol->dev);
}
-static void on_mount_cancelled(GCancellable* cancellable, gpointer user_data)
-{
- AsyncData* data = (AsyncData*)user_data;
- dbus_g_proxy_cancel_call(data->proxy, data->call);
-}
-
-static void mount_callback(DBusGProxy *proxy, char * OUT_mount_path, GError *error, gpointer user_data)
+static void mount_callback(GObject *source, GAsyncResult *result, gpointer user_data)
{
+ GDBusProxy* proxy = (GDBusProxy *)source;
AsyncData* data = (AsyncData*)user_data;
GSimpleAsyncResult* res;
+ GError *error = NULL;
+ GVariant *val = g_dbus_proxy_call_finish(proxy, result, &error);
+
g_debug("mount callback!!");
if(error)
{
- error = g_udisks_error_to_gio_error(error);
res = g_simple_async_result_new_from_error(G_OBJECT(data->vol),
data->callback,
data->user_data,
@@ -288,90 +310,82 @@ static void mount_callback(DBusGProxy *proxy, char * OUT_mount_path, GError *err
data->user_data,
NULL);
g_simple_async_result_set_op_res_gboolean(res, TRUE);
-
- /* FIXME: ensure we have working mount paths to generate GMount object. */
- if(data->vol->dev->mount_paths)
- {
- char** p = data->vol->dev->mount_paths;
- for(; *p; ++p)
- if(strcmp(*p, OUT_mount_path) == 0)
- break;
- if(!*p) /* OUT_mount_path is not in mount_paths */
- {
- int len = g_strv_length(data->vol->dev->mount_paths);
- data->vol->dev->mount_paths = g_realloc(data->vol->dev->mount_paths, + 2);
- memcpy(data->vol->dev->mount_paths, data->vol->dev->mount_paths + sizeof(char*), len * sizeof(char*));
- data->vol->dev->mount_paths[0] = g_strdup(OUT_mount_path);
- }
- }
- else
- {
- data->vol->dev->mount_paths = g_new0(char*, 2);
- data->vol->dev->mount_paths[0] = g_strdup(OUT_mount_path);
- data->vol->dev->mount_paths[1] = NULL;
- }
-
+ g_variant_unref(val);
}
g_simple_async_result_complete(res);
g_object_unref(res);
- if(data->cancellable)
- {
- g_signal_handlers_disconnect_by_func(data->cancellable, on_mount_cancelled, data);
- g_object_unref(data->cancellable);
- }
g_object_unref(data->vol);
- g_object_unref(data->proxy);
g_slice_free(AsyncData, data);
}
-static void g_udisks_volume_mount_fn(GVolume* base, GMountMountFlags flags, GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, void* user_data)
+static void g_udisks_volume_mount_fn(GVolume* base, GMountMountFlags flags,
+ GMountOperation* mount_operation,
+ GCancellable* cancellable,
+ GAsyncReadyCallback callback, void* user_data)
{
/* FIXME: need to make sure this works correctly */
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
GUDisksDevice* dev = vol->dev;
- GUDisksVolumeMonitor* mon = vol->mon;
- AsyncData* data = g_slice_new(AsyncData);
- DBusGProxy* proxy = g_udisks_device_get_proxy(dev, mon->con);
- data->vol = g_object_ref(vol);
- data->callback = callback;
- data->user_data = user_data;
- data->proxy = proxy;
-
- g_debug("mount_fn");
-
- data->call = org_freedesktop_UDisks_Device_filesystem_mount_async(
- proxy, dev->type ? dev->type : "auto", NULL, mount_callback, data);
- if(cancellable)
+ GDBusProxy* proxy = g_udisks_device_get_fs_proxy(dev);
+
+ if (proxy)
+ {
+ AsyncData* data = g_slice_new(AsyncData);
+ GVariant* fstype = g_udisks_device_get_fstype(dev);
+ GVariantBuilder b;
+
+ g_debug("send DBus request to mount %s", g_udisks_device_get_obj_path(dev));
+ data->vol = g_object_ref(vol);
+ data->callback = callback;
+ data->user_data = user_data;
+
+ g_variant_builder_init(&b, G_VARIANT_TYPE("(a{sv})"));
+ g_variant_builder_open(&b, G_VARIANT_TYPE ("a{sv}"));
+ g_variant_builder_add(&b, "{sv}", "fstype", fstype);
+ g_variant_builder_close(&b);
+ g_dbus_proxy_call(proxy, "Mount", g_variant_builder_end(&b),
+ G_DBUS_CALL_FLAGS_NONE, -1, cancellable,
+ mount_callback, data);
+ g_object_unref(proxy);
+ g_variant_unref(fstype);
+ }
+ else
{
- data->cancellable = g_object_ref(cancellable);
- g_signal_connect(cancellable, "cancelled", G_CALLBACK(on_mount_cancelled), data);
+ GSimpleAsyncResult* res;
+ char *dev_file = g_udisks_device_get_dev_file(dev);
+
+ res = g_simple_async_result_new_error(G_OBJECT(vol), callback, user_data,
+ G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("No filesystem proxy for '%s'"),
+ dev_file);
+ g_simple_async_result_complete(res);
+ g_object_unref(res);
+ g_free(dev_file);
}
}
static gboolean g_udisks_volume_mount_finish(GVolume* base, GAsyncResult* res, GError** error)
{
- //GUDisksVolume* vol = G_UDISKS_VOLUME(base);
return !g_simple_async_result_propagate_error(G_SIMPLE_ASYNC_RESULT(res), error);
}
static gboolean g_udisks_volume_should_automount (GVolume* base)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
- return vol->dev->auto_mount;
+ return g_udisks_device_can_auto_mount(vol->dev);
}
static gboolean g_udisks_volume_eject_with_operation_finish (GVolume* base, GAsyncResult* res, GError** error)
{
GUDisksVolume* vol = G_UDISKS_VOLUME(base);
/* FIXME: is this correct? */
- return g_drive_eject_with_operation_finish(G_DRIVE(vol->drive), res, error);
+ return g_drive_eject_with_operation_finish(G_DRIVE(vol->drv), res, error);
}
static gboolean g_udisks_volume_eject_finish (GVolume* base, GAsyncResult* res, GError** error)
{
- //GUDisksVolume* vol = G_UDISKS_VOLUME(base);
return g_udisks_volume_eject_with_operation_finish(base, res, error);
}
@@ -400,14 +414,111 @@ static void g_udisks_volume_volume_iface_init (GVolumeIface * iface)
sig_removed = g_signal_lookup("removed", G_TYPE_VOLUME);
}
-void g_udisks_volume_changed(GUDisksVolume* vol)
+/**
+ * g_udisks_volume_set_mounts
+ * @vol: volume instance
+ * @dev: associated device
+ *
+ * Updates mounts list to actual one. Allocates and releases GUDisksMount
+ * objects as needed.
+ *
+ * Returns: %TRUE if list was changed since last call.
+ */
+static gboolean g_udisks_volume_set_mounts(GUDisksVolume* vol, GUDisksDevice* dev)
{
- g_udisks_volume_clear(vol);
- g_signal_emit(vol, sig_changed, 0);
+ char **mount_points = g_udisks_device_get_mount_paths(dev);
+ GList *new_list = NULL, *list;
+ char **point;
+ gboolean changed = FALSE;
+
+ g_return_val_if_fail(G_IS_UDISKS_VOLUME(vol), FALSE);
+
+ for (point = mount_points; point && *point; point++)
+ {
+ GFile *new_root = g_file_new_for_path(*point), *mount_root;
+
+ for (list = vol->mounts; list; list = list->next)
+ {
+ mount_root = g_mount_get_root(list->data);
+ if (g_file_equal(new_root, mount_root))
+ {
+ g_object_unref(mount_root);
+ vol->mounts = g_list_remove_link(vol->mounts, list);
+ new_list = g_list_concat(list, new_list);
+ break;
+ }
+ g_object_unref(mount_root);
+ }
+ if (!list)
+ {
+ GUDisksMount *mnt = g_udisks_mount_new(vol, new_root);
+ new_list = g_list_prepend(new_list, mnt);
+ g_debug("adding new mount for '%s' at '%s'",
+ strrchr(g_udisks_device_get_obj_path(vol->dev), '/'),
+ *point);
+ /* emit "mount-added" signal */
+ g_signal_emit(vol, sig_mount_added, 0, mnt);
+ changed = TRUE;
+ }
+ g_object_unref(new_root);
+ }
+ while(vol->mounts)
+ {
+ GUDisksMount *mnt = vol->mounts->data;
+ GFile *f_root = g_mount_get_root(vol->mounts->data);
+ char *c_root = g_file_get_path(f_root);
+ g_debug("removing gone mount '%s'", c_root);
+ g_free(c_root);
+ g_object_unref(f_root);
+ vol->mounts = g_list_delete_link(vol->mounts, vol->mounts);
+ /* emit "mount-unmounted" signal */
+ g_udisks_mount_unmounted(mnt);
+ g_object_unref(mnt);
+ changed = TRUE;
+ }
+ vol->mounts = g_list_reverse(new_list);
+
+ g_strfreev(mount_points);
+ return changed;
+}
+
+/**
+ * g_udisks_volume_get_mounts
+ * @vol: volume instance
+ *
+ * Retrieves currently mounted points.
+ *
+ * Returns: (element-type GUDisksMount)(transfer container): list of mounts.
+ */
+GList *g_udisks_volume_get_mounts(GUDisksVolume* vol)
+{
+ g_return_val_if_fail(G_IS_UDISKS_VOLUME(vol), NULL);
+ return g_list_copy(vol->mounts);
+}
+
+/**
+ * g_udisks_volume_get_device
+ * @vol: volume instance
+ *
+ * Retrieves device which volume belongs to.
+ *
+ * Returns: (transfer none): GUDisksDevice instance.
+ */
+GUDisksDevice *g_udisks_volume_get_device(GUDisksVolume* vol)
+{
+ g_return_val_if_fail(G_IS_UDISKS_VOLUME(vol), NULL);
+ return vol->dev;
+}
+
+const char *g_udisks_volume_get_obj_path(GUDisksVolume* vol)
+{
+ g_return_val_if_fail(G_IS_UDISKS_VOLUME(vol), NULL);
+ return g_udisks_device_get_obj_path(vol->dev);
}
void g_udisks_volume_removed(GUDisksVolume* vol)
{
- vol->drive = NULL;
+ g_return_if_fail(G_IS_UDISKS_VOLUME(vol));
+ g_udisks_drive_del_volume(vol->drv, vol);
g_signal_emit(vol, sig_removed, 0);
}
diff --git a/src/udisks/g-udisks-volume.h b/src/udisks/g-udisks-volume.h
index 650a1c33..183ba758 100644
--- a/src/udisks/g-udisks-volume.h
+++ b/src/udisks/g-udisks-volume.h
@@ -1,6 +1,7 @@
// g-udisks-volume.h
//
// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
+// Copyright 2021 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -24,12 +25,9 @@
#include <gio/gio.h>
#include "g-udisks-device.h"
#include "g-udisks-drive.h"
-#include "g-udisks-mount.h"
-#include "g-udisks-volume-monitor.h"
G_BEGIN_DECLS
-
#define G_TYPE_UDISKS_VOLUME (g_udisks_volume_get_type())
#define G_UDISKS_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
G_TYPE_UDISKS_VOLUME, GUDisksVolume))
@@ -45,29 +43,23 @@ G_BEGIN_DECLS
typedef struct _GUDisksVolume GUDisksVolume;
typedef struct _GUDisksVolumeClass GUDisksVolumeClass;
-struct _GUDisksVolume
-{
- GObject parent;
- GUDisksDevice* dev;
- GIcon* icon;
- char* name;
- GUDisksDrive* drive;
- GUDisksMount* mount;
- GUDisksVolumeMonitor* mon;
-};
-struct _GUDisksVolumeClass
-{
- GObjectClass parent_class;
-};
+GType g_udisks_volume_get_type(void);
+GUDisksVolume* g_udisks_volume_new(const char* obj_path, GDBusConnection* con,
+ GFile* activation_root, GUDisksDrive* drv,
+ GCancellable* cancellable, GError** error);
+GList *g_udisks_volume_get_mounts(GUDisksVolume* vol);
-GType g_udisks_volume_get_type(void);
-GUDisksVolume* g_udisks_volume_new(GUDisksVolumeMonitor* mon, GUDisksDevice* dev);
+GUDisksDevice *g_udisks_volume_get_device(GUDisksVolume* vol);
+const char *g_udisks_volume_get_obj_path(GUDisksVolume* vol);
-void g_udisks_volume_changed(GUDisksVolume* vol);
void g_udisks_volume_removed(GUDisksVolume* vol);
+/* these functions belongs to g-udisks-drive.h but are here for header sake */
+void g_udisks_drive_add_volume(GUDisksDrive* drv, GUDisksVolume* vol);
+void g_udisks_drive_del_volume(GUDisksDrive* drv, GUDisksVolume* vol);
+
G_END_DECLS
#endif /* __G_UDISKS_VOLUME_H__ */
diff --git a/src/udisks/gen-binding b/src/udisks/gen-binding
deleted file mode 100755
index 08ac5004..00000000
--- a/src/udisks/gen-binding
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-dbus-binding-tool --mode=glib-client /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.xml > udisks.h
-dbus-binding-tool --mode=glib-client /usr/share/dbus-1/interfaces/org.freedesktop.UDisks.Device.xml > udisks-device.h
diff --git a/src/udisks/udisks-device.h b/src/udisks/udisks-device.h
deleted file mode 100644
index 7b3e2aef..00000000
--- a/src/udisks/udisks-device.h
+++ /dev/null
@@ -1,1147 +0,0 @@
-/* Generated by dbus-binding-tool; do not edit! */
-
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-
-G_BEGIN_DECLS
-
-#ifndef _DBUS_GLIB_ASYNC_DATA_FREE
-#define _DBUS_GLIB_ASYNC_DATA_FREE
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-void
-_dbus_glib_async_data_free (gpointer stuff)
-{
- g_slice_free (DBusGAsyncData, stuff);
-}
-#endif
-
-#ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_UDisks_Device
-#define DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_UDisks_Device
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_job_cancel (DBusGProxy *proxy, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "JobCancel", error, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_job_cancel_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_job_cancel_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_job_cancel_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_job_cancel_async (DBusGProxy *proxy, org_freedesktop_UDisks_Device_job_cancel_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "JobCancel", org_freedesktop_UDisks_Device_job_cancel_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_partition_table_create (DBusGProxy *proxy, const char * IN_scheme, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "PartitionTableCreate", error, G_TYPE_STRING, IN_scheme, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_partition_table_create_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_partition_table_create_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_partition_table_create_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_partition_table_create_async (DBusGProxy *proxy, const char * IN_scheme, const char ** IN_options, org_freedesktop_UDisks_Device_partition_table_create_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "PartitionTableCreate", org_freedesktop_UDisks_Device_partition_table_create_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_scheme, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_partition_delete (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "PartitionDelete", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_partition_delete_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_partition_delete_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_partition_delete_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_partition_delete_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_partition_delete_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "PartitionDelete", org_freedesktop_UDisks_Device_partition_delete_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_partition_create (DBusGProxy *proxy, const guint64 IN_offset, const guint64 IN_size, const char * IN_type, const char * IN_label, const char ** IN_flags, const char ** IN_options, const char * IN_fstype, const char ** IN_fsoptions, char** OUT_created_device, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "PartitionCreate", error, G_TYPE_UINT64, IN_offset, G_TYPE_UINT64, IN_size, G_TYPE_STRING, IN_type, G_TYPE_STRING, IN_label, G_TYPE_STRV, IN_flags, G_TYPE_STRV, IN_options, G_TYPE_STRING, IN_fstype, G_TYPE_STRV, IN_fsoptions, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_created_device, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_partition_create_reply) (DBusGProxy *proxy, char *OUT_created_device, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_partition_create_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char* OUT_created_device;
- dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_created_device, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_partition_create_reply)data->cb) (proxy, OUT_created_device, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_partition_create_async (DBusGProxy *proxy, const guint64 IN_offset, const guint64 IN_size, const char * IN_type, const char * IN_label, const char ** IN_flags, const char ** IN_options, const char * IN_fstype, const char ** IN_fsoptions, org_freedesktop_UDisks_Device_partition_create_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "PartitionCreate", org_freedesktop_UDisks_Device_partition_create_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_UINT64, IN_offset, G_TYPE_UINT64, IN_size, G_TYPE_STRING, IN_type, G_TYPE_STRING, IN_label, G_TYPE_STRV, IN_flags, G_TYPE_STRV, IN_options, G_TYPE_STRING, IN_fstype, G_TYPE_STRV, IN_fsoptions, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_partition_modify (DBusGProxy *proxy, const char * IN_type, const char * IN_label, const char ** IN_flags, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "PartitionModify", error, G_TYPE_STRING, IN_type, G_TYPE_STRING, IN_label, G_TYPE_STRV, IN_flags, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_partition_modify_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_partition_modify_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_partition_modify_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_partition_modify_async (DBusGProxy *proxy, const char * IN_type, const char * IN_label, const char ** IN_flags, org_freedesktop_UDisks_Device_partition_modify_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "PartitionModify", org_freedesktop_UDisks_Device_partition_modify_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_type, G_TYPE_STRING, IN_label, G_TYPE_STRV, IN_flags, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_filesystem_create (DBusGProxy *proxy, const char * IN_fstype, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FilesystemCreate", error, G_TYPE_STRING, IN_fstype, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_filesystem_create_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_filesystem_create_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_filesystem_create_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_filesystem_create_async (DBusGProxy *proxy, const char * IN_fstype, const char ** IN_options, org_freedesktop_UDisks_Device_filesystem_create_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FilesystemCreate", org_freedesktop_UDisks_Device_filesystem_create_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_fstype, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_filesystem_set_label (DBusGProxy *proxy, const char * IN_new_label, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FilesystemSetLabel", error, G_TYPE_STRING, IN_new_label, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_filesystem_set_label_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_filesystem_set_label_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_filesystem_set_label_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_filesystem_set_label_async (DBusGProxy *proxy, const char * IN_new_label, org_freedesktop_UDisks_Device_filesystem_set_label_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FilesystemSetLabel", org_freedesktop_UDisks_Device_filesystem_set_label_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_new_label, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_filesystem_mount (DBusGProxy *proxy, const char * IN_filesystem_type, const char ** IN_options, char ** OUT_mount_path, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FilesystemMount", error, G_TYPE_STRING, IN_filesystem_type, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_STRING, OUT_mount_path, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_filesystem_mount_reply) (DBusGProxy *proxy, char * OUT_mount_path, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_filesystem_mount_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char * OUT_mount_path;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_mount_path, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_filesystem_mount_reply)data->cb) (proxy, OUT_mount_path, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_filesystem_mount_async (DBusGProxy *proxy, const char * IN_filesystem_type, const char ** IN_options, org_freedesktop_UDisks_Device_filesystem_mount_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FilesystemMount", org_freedesktop_UDisks_Device_filesystem_mount_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_filesystem_type, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_filesystem_unmount (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FilesystemUnmount", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_filesystem_unmount_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_filesystem_unmount_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_filesystem_unmount_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_filesystem_unmount_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_filesystem_unmount_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FilesystemUnmount", org_freedesktop_UDisks_Device_filesystem_unmount_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_filesystem_check (DBusGProxy *proxy, const char ** IN_options, gboolean* OUT_is_clean, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FilesystemCheck", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_BOOLEAN, OUT_is_clean, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_filesystem_check_reply) (DBusGProxy *proxy, gboolean OUT_is_clean, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_filesystem_check_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- gboolean OUT_is_clean;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_BOOLEAN, &OUT_is_clean, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_filesystem_check_reply)data->cb) (proxy, OUT_is_clean, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_filesystem_check_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_filesystem_check_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FilesystemCheck", org_freedesktop_UDisks_Device_filesystem_check_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_filesystem_list_open_files (DBusGProxy *proxy, GPtrArray** OUT_processes, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FilesystemListOpenFiles", error, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_INVALID)), OUT_processes, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_filesystem_list_open_files_reply) (DBusGProxy *proxy, GPtrArray *OUT_processes, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_filesystem_list_open_files_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- GPtrArray* OUT_processes;
- dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_INVALID)), &OUT_processes, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_filesystem_list_open_files_reply)data->cb) (proxy, OUT_processes, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_filesystem_list_open_files_async (DBusGProxy *proxy, org_freedesktop_UDisks_Device_filesystem_list_open_files_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FilesystemListOpenFiles", org_freedesktop_UDisks_Device_filesystem_list_open_files_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_luks_unlock (DBusGProxy *proxy, const char * IN_passphrase, const char ** IN_options, char** OUT_cleartext_device, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LuksUnlock", error, G_TYPE_STRING, IN_passphrase, G_TYPE_STRV, IN_options, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_cleartext_device, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_luks_unlock_reply) (DBusGProxy *proxy, char *OUT_cleartext_device, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_luks_unlock_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char* OUT_cleartext_device;
- dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_cleartext_device, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_luks_unlock_reply)data->cb) (proxy, OUT_cleartext_device, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_luks_unlock_async (DBusGProxy *proxy, const char * IN_passphrase, const char ** IN_options, org_freedesktop_UDisks_Device_luks_unlock_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LuksUnlock", org_freedesktop_UDisks_Device_luks_unlock_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_passphrase, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_luks_lock (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LuksLock", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_luks_lock_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_luks_lock_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_luks_lock_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_luks_lock_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_luks_lock_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LuksLock", org_freedesktop_UDisks_Device_luks_lock_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_luks_change_passphrase (DBusGProxy *proxy, const char * IN_current_passphrase, const char * IN_new_passphrase, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LuksChangePassphrase", error, G_TYPE_STRING, IN_current_passphrase, G_TYPE_STRING, IN_new_passphrase, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_luks_change_passphrase_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_luks_change_passphrase_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_luks_change_passphrase_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_luks_change_passphrase_async (DBusGProxy *proxy, const char * IN_current_passphrase, const char * IN_new_passphrase, org_freedesktop_UDisks_Device_luks_change_passphrase_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LuksChangePassphrase", org_freedesktop_UDisks_Device_luks_change_passphrase_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_current_passphrase, G_TYPE_STRING, IN_new_passphrase, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_linux_md_add_spare (DBusGProxy *proxy, const char* IN_component, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxMdAddSpare", error, DBUS_TYPE_G_OBJECT_PATH, IN_component, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_linux_md_add_spare_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_linux_md_add_spare_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_linux_md_add_spare_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_linux_md_add_spare_async (DBusGProxy *proxy, const char* IN_component, const char ** IN_options, org_freedesktop_UDisks_Device_linux_md_add_spare_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxMdAddSpare", org_freedesktop_UDisks_Device_linux_md_add_spare_async_callback, stuff, _dbus_glib_async_data_free, DBUS_TYPE_G_OBJECT_PATH, IN_component, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_linux_md_expand (DBusGProxy *proxy, const GPtrArray* IN_components, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxMdExpand", error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), IN_components, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_linux_md_expand_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_linux_md_expand_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_linux_md_expand_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_linux_md_expand_async (DBusGProxy *proxy, const GPtrArray* IN_components, const char ** IN_options, org_freedesktop_UDisks_Device_linux_md_expand_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxMdExpand", org_freedesktop_UDisks_Device_linux_md_expand_async_callback, stuff, _dbus_glib_async_data_free, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), IN_components, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_linux_md_remove_component (DBusGProxy *proxy, const char* IN_component, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxMdRemoveComponent", error, DBUS_TYPE_G_OBJECT_PATH, IN_component, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_linux_md_remove_component_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_linux_md_remove_component_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_linux_md_remove_component_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_linux_md_remove_component_async (DBusGProxy *proxy, const char* IN_component, const char ** IN_options, org_freedesktop_UDisks_Device_linux_md_remove_component_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxMdRemoveComponent", org_freedesktop_UDisks_Device_linux_md_remove_component_async_callback, stuff, _dbus_glib_async_data_free, DBUS_TYPE_G_OBJECT_PATH, IN_component, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_linux_md_stop (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxMdStop", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_linux_md_stop_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_linux_md_stop_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_linux_md_stop_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_linux_md_stop_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_linux_md_stop_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxMdStop", org_freedesktop_UDisks_Device_linux_md_stop_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_linux_lvm2_lv_stop (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2LVStop", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_linux_lvm2_lv_stop_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_linux_lvm2_lv_stop_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_linux_lvm2_lv_stop_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_linux_lvm2_lv_stop_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_linux_lvm2_lv_stop_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2LVStop", org_freedesktop_UDisks_Device_linux_lvm2_lv_stop_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_linux_md_check (DBusGProxy *proxy, const char ** IN_options, guint64* OUT_number_of_errors, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxMdCheck", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_UINT64, OUT_number_of_errors, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_linux_md_check_reply) (DBusGProxy *proxy, guint64 OUT_number_of_errors, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_linux_md_check_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- guint64 OUT_number_of_errors;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT64, &OUT_number_of_errors, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_linux_md_check_reply)data->cb) (proxy, OUT_number_of_errors, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_linux_md_check_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_linux_md_check_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxMdCheck", org_freedesktop_UDisks_Device_linux_md_check_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_inhibit_polling (DBusGProxy *proxy, const char ** IN_options, char ** OUT_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveInhibitPolling", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_STRING, OUT_cookie, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_inhibit_polling_reply) (DBusGProxy *proxy, char * OUT_cookie, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_inhibit_polling_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char * OUT_cookie;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_cookie, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_inhibit_polling_reply)data->cb) (proxy, OUT_cookie, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_inhibit_polling_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_drive_inhibit_polling_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveInhibitPolling", org_freedesktop_UDisks_Device_drive_inhibit_polling_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_uninhibit_polling (DBusGProxy *proxy, const char * IN_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveUninhibitPolling", error, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_uninhibit_polling_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_uninhibit_polling_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_uninhibit_polling_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_uninhibit_polling_async (DBusGProxy *proxy, const char * IN_cookie, org_freedesktop_UDisks_Device_drive_uninhibit_polling_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveUninhibitPolling", org_freedesktop_UDisks_Device_drive_uninhibit_polling_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_poll_media (DBusGProxy *proxy, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DrivePollMedia", error, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_poll_media_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_poll_media_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_poll_media_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_poll_media_async (DBusGProxy *proxy, org_freedesktop_UDisks_Device_drive_poll_media_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DrivePollMedia", org_freedesktop_UDisks_Device_drive_poll_media_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_eject (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveEject", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_eject_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_eject_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_eject_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_eject_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_drive_eject_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveEject", org_freedesktop_UDisks_Device_drive_eject_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_detach (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveDetach", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_detach_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_detach_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_detach_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_detach_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_drive_detach_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveDetach", org_freedesktop_UDisks_Device_drive_detach_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_set_spindown_timeout (DBusGProxy *proxy, const gint IN_timeout_seconds, const char ** IN_options, char ** OUT_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveSetSpindownTimeout", error, G_TYPE_INT, IN_timeout_seconds, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_STRING, OUT_cookie, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_set_spindown_timeout_reply) (DBusGProxy *proxy, char * OUT_cookie, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_set_spindown_timeout_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char * OUT_cookie;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_cookie, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_set_spindown_timeout_reply)data->cb) (proxy, OUT_cookie, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_set_spindown_timeout_async (DBusGProxy *proxy, const gint IN_timeout_seconds, const char ** IN_options, org_freedesktop_UDisks_Device_drive_set_spindown_timeout_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveSetSpindownTimeout", org_freedesktop_UDisks_Device_drive_set_spindown_timeout_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT, IN_timeout_seconds, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_unset_spindown_timeout (DBusGProxy *proxy, const char * IN_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveUnsetSpindownTimeout", error, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_unset_spindown_timeout_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_unset_spindown_timeout_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_unset_spindown_timeout_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_unset_spindown_timeout_async (DBusGProxy *proxy, const char * IN_cookie, org_freedesktop_UDisks_Device_drive_unset_spindown_timeout_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveUnsetSpindownTimeout", org_freedesktop_UDisks_Device_drive_unset_spindown_timeout_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data (DBusGProxy *proxy, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveAtaSmartRefreshData", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveAtaSmartRefreshData", org_freedesktop_UDisks_Device_drive_ata_smart_refresh_data_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest (DBusGProxy *proxy, const char * IN_test, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveAtaSmartInitiateSelftest", error, G_TYPE_STRING, IN_test, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest_async (DBusGProxy *proxy, const char * IN_test, const char ** IN_options, org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveAtaSmartInitiateSelftest", org_freedesktop_UDisks_Device_drive_ata_smart_initiate_selftest_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_test, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_Device_drive_benchmark (DBusGProxy *proxy, const gboolean IN_do_write_benchmark, const char ** IN_options, GPtrArray** OUT_read_transfer_rate_results, GPtrArray** OUT_write_transfer_rate_results, GPtrArray** OUT_access_time_results, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveBenchmark", error, G_TYPE_BOOLEAN, IN_do_write_benchmark, G_TYPE_STRV, IN_options, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT64, G_TYPE_DOUBLE, G_TYPE_INVALID)), OUT_read_transfer_rate_results, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT64, G_TYPE_DOUBLE, G_TYPE_INVALID)), OUT_write_transfer_rate_results, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT64, G_TYPE_DOUBLE, G_TYPE_INVALID)), OUT_access_time_results, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_Device_drive_benchmark_reply) (DBusGProxy *proxy, GPtrArray *OUT_read_transfer_rate_results, GPtrArray *OUT_write_transfer_rate_results, GPtrArray *OUT_access_time_results, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_Device_drive_benchmark_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- GPtrArray* OUT_read_transfer_rate_results;
- GPtrArray* OUT_write_transfer_rate_results;
- GPtrArray* OUT_access_time_results;
- dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT64, G_TYPE_DOUBLE, G_TYPE_INVALID)), &OUT_read_transfer_rate_results, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT64, G_TYPE_DOUBLE, G_TYPE_INVALID)), &OUT_write_transfer_rate_results, dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT64, G_TYPE_DOUBLE, G_TYPE_INVALID)), &OUT_access_time_results, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_Device_drive_benchmark_reply)data->cb) (proxy, OUT_read_transfer_rate_results, OUT_write_transfer_rate_results, OUT_access_time_results, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_Device_drive_benchmark_async (DBusGProxy *proxy, const gboolean IN_do_write_benchmark, const char ** IN_options, org_freedesktop_UDisks_Device_drive_benchmark_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveBenchmark", org_freedesktop_UDisks_Device_drive_benchmark_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_BOOLEAN, IN_do_write_benchmark, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-#endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_UDisks_Device */
-
-G_END_DECLS
diff --git a/src/udisks/udisks.h b/src/udisks/udisks.h
deleted file mode 100644
index 9bf0baae..00000000
--- a/src/udisks/udisks.h
+++ /dev/null
@@ -1,927 +0,0 @@
-/* Generated by dbus-binding-tool; do not edit! */
-
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-
-G_BEGIN_DECLS
-
-#ifndef _DBUS_GLIB_ASYNC_DATA_FREE
-#define _DBUS_GLIB_ASYNC_DATA_FREE
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-void
-_dbus_glib_async_data_free (gpointer stuff)
-{
- g_slice_free (DBusGAsyncData, stuff);
-}
-#endif
-
-#ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_UDisks
-#define DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_UDisks
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_enumerate_adapters (DBusGProxy *proxy, GPtrArray** OUT_devices, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "EnumerateAdapters", error, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), OUT_devices, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_enumerate_adapters_reply) (DBusGProxy *proxy, GPtrArray *OUT_devices, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_enumerate_adapters_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- GPtrArray* OUT_devices;
- dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &OUT_devices, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_enumerate_adapters_reply)data->cb) (proxy, OUT_devices, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_enumerate_adapters_async (DBusGProxy *proxy, org_freedesktop_UDisks_enumerate_adapters_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "EnumerateAdapters", org_freedesktop_UDisks_enumerate_adapters_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_enumerate_expanders (DBusGProxy *proxy, GPtrArray** OUT_devices, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "EnumerateExpanders", error, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), OUT_devices, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_enumerate_expanders_reply) (DBusGProxy *proxy, GPtrArray *OUT_devices, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_enumerate_expanders_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- GPtrArray* OUT_devices;
- dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &OUT_devices, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_enumerate_expanders_reply)data->cb) (proxy, OUT_devices, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_enumerate_expanders_async (DBusGProxy *proxy, org_freedesktop_UDisks_enumerate_expanders_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "EnumerateExpanders", org_freedesktop_UDisks_enumerate_expanders_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_enumerate_ports (DBusGProxy *proxy, GPtrArray** OUT_devices, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "EnumeratePorts", error, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), OUT_devices, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_enumerate_ports_reply) (DBusGProxy *proxy, GPtrArray *OUT_devices, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_enumerate_ports_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- GPtrArray* OUT_devices;
- dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &OUT_devices, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_enumerate_ports_reply)data->cb) (proxy, OUT_devices, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_enumerate_ports_async (DBusGProxy *proxy, org_freedesktop_UDisks_enumerate_ports_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "EnumeratePorts", org_freedesktop_UDisks_enumerate_ports_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_enumerate_devices (DBusGProxy *proxy, GPtrArray** OUT_devices, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "EnumerateDevices", error, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), OUT_devices, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_enumerate_devices_reply) (DBusGProxy *proxy, GPtrArray *OUT_devices, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_enumerate_devices_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- GPtrArray* OUT_devices;
- dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &OUT_devices, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_enumerate_devices_reply)data->cb) (proxy, OUT_devices, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_enumerate_devices_async (DBusGProxy *proxy, org_freedesktop_UDisks_enumerate_devices_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "EnumerateDevices", org_freedesktop_UDisks_enumerate_devices_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_enumerate_device_files (DBusGProxy *proxy, char *** OUT_device_files, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "EnumerateDeviceFiles", error, G_TYPE_INVALID, G_TYPE_STRV, OUT_device_files, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_enumerate_device_files_reply) (DBusGProxy *proxy, char * *OUT_device_files, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_enumerate_device_files_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char ** OUT_device_files;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRV, &OUT_device_files, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_enumerate_device_files_reply)data->cb) (proxy, OUT_device_files, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_enumerate_device_files_async (DBusGProxy *proxy, org_freedesktop_UDisks_enumerate_device_files_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "EnumerateDeviceFiles", org_freedesktop_UDisks_enumerate_device_files_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_find_device_by_device_file (DBusGProxy *proxy, const char * IN_device_file, char** OUT_device, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FindDeviceByDeviceFile", error, G_TYPE_STRING, IN_device_file, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_device, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_find_device_by_device_file_reply) (DBusGProxy *proxy, char *OUT_device, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_find_device_by_device_file_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char* OUT_device;
- dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_device, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_find_device_by_device_file_reply)data->cb) (proxy, OUT_device, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_find_device_by_device_file_async (DBusGProxy *proxy, const char * IN_device_file, org_freedesktop_UDisks_find_device_by_device_file_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FindDeviceByDeviceFile", org_freedesktop_UDisks_find_device_by_device_file_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_device_file, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_find_device_by_major_minor (DBusGProxy *proxy, const gint64 IN_device_major, const gint64 IN_device_minor, char** OUT_device, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "FindDeviceByMajorMinor", error, G_TYPE_INT64, IN_device_major, G_TYPE_INT64, IN_device_minor, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_device, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_find_device_by_major_minor_reply) (DBusGProxy *proxy, char *OUT_device, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_find_device_by_major_minor_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char* OUT_device;
- dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_device, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_find_device_by_major_minor_reply)data->cb) (proxy, OUT_device, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_find_device_by_major_minor_async (DBusGProxy *proxy, const gint64 IN_device_major, const gint64 IN_device_minor, org_freedesktop_UDisks_find_device_by_major_minor_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "FindDeviceByMajorMinor", org_freedesktop_UDisks_find_device_by_major_minor_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT64, IN_device_major, G_TYPE_INT64, IN_device_minor, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_drive_inhibit_all_polling (DBusGProxy *proxy, const char ** IN_options, char ** OUT_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveInhibitAllPolling", error, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_STRING, OUT_cookie, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_drive_inhibit_all_polling_reply) (DBusGProxy *proxy, char * OUT_cookie, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_drive_inhibit_all_polling_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char * OUT_cookie;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_cookie, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_drive_inhibit_all_polling_reply)data->cb) (proxy, OUT_cookie, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_drive_inhibit_all_polling_async (DBusGProxy *proxy, const char ** IN_options, org_freedesktop_UDisks_drive_inhibit_all_polling_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveInhibitAllPolling", org_freedesktop_UDisks_drive_inhibit_all_polling_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_drive_uninhibit_all_polling (DBusGProxy *proxy, const char * IN_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveUninhibitAllPolling", error, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_drive_uninhibit_all_polling_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_drive_uninhibit_all_polling_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_drive_uninhibit_all_polling_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_drive_uninhibit_all_polling_async (DBusGProxy *proxy, const char * IN_cookie, org_freedesktop_UDisks_drive_uninhibit_all_polling_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveUninhibitAllPolling", org_freedesktop_UDisks_drive_uninhibit_all_polling_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_drive_set_all_spindown_timeouts (DBusGProxy *proxy, const gint IN_timeout_seconds, const char ** IN_options, char ** OUT_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveSetAllSpindownTimeouts", error, G_TYPE_INT, IN_timeout_seconds, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_STRING, OUT_cookie, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_drive_set_all_spindown_timeouts_reply) (DBusGProxy *proxy, char * OUT_cookie, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_drive_set_all_spindown_timeouts_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char * OUT_cookie;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_cookie, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_drive_set_all_spindown_timeouts_reply)data->cb) (proxy, OUT_cookie, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_drive_set_all_spindown_timeouts_async (DBusGProxy *proxy, const gint IN_timeout_seconds, const char ** IN_options, org_freedesktop_UDisks_drive_set_all_spindown_timeouts_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveSetAllSpindownTimeouts", org_freedesktop_UDisks_drive_set_all_spindown_timeouts_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT, IN_timeout_seconds, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_drive_unset_all_spindown_timeouts (DBusGProxy *proxy, const char * IN_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "DriveUnsetAllSpindownTimeouts", error, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_drive_unset_all_spindown_timeouts_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_drive_unset_all_spindown_timeouts_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_drive_unset_all_spindown_timeouts_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_drive_unset_all_spindown_timeouts_async (DBusGProxy *proxy, const char * IN_cookie, org_freedesktop_UDisks_drive_unset_all_spindown_timeouts_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "DriveUnsetAllSpindownTimeouts", org_freedesktop_UDisks_drive_unset_all_spindown_timeouts_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_vg_start (DBusGProxy *proxy, const char * IN_uuid, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2VGStart", error, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_vg_start_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_vg_start_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_vg_start_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_vg_start_async (DBusGProxy *proxy, const char * IN_uuid, const char ** IN_options, org_freedesktop_UDisks_linux_lvm2_vg_start_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2VGStart", org_freedesktop_UDisks_linux_lvm2_vg_start_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_vg_stop (DBusGProxy *proxy, const char * IN_uuid, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2VGStop", error, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_vg_stop_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_vg_stop_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_vg_stop_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_vg_stop_async (DBusGProxy *proxy, const char * IN_uuid, const char ** IN_options, org_freedesktop_UDisks_linux_lvm2_vg_stop_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2VGStop", org_freedesktop_UDisks_linux_lvm2_vg_stop_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_vg_set_name (DBusGProxy *proxy, const char * IN_uuid, const char * IN_name, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2VGSetName", error, G_TYPE_STRING, IN_uuid, G_TYPE_STRING, IN_name, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_vg_set_name_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_vg_set_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_vg_set_name_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_vg_set_name_async (DBusGProxy *proxy, const char * IN_uuid, const char * IN_name, org_freedesktop_UDisks_linux_lvm2_vg_set_name_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2VGSetName", org_freedesktop_UDisks_linux_lvm2_vg_set_name_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_uuid, G_TYPE_STRING, IN_name, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_vg_add_pv (DBusGProxy *proxy, const char * IN_uuid, const char* IN_physical_volume, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2VGAddPV", error, G_TYPE_STRING, IN_uuid, DBUS_TYPE_G_OBJECT_PATH, IN_physical_volume, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_vg_add_pv_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_vg_add_pv_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_vg_add_pv_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_vg_add_pv_async (DBusGProxy *proxy, const char * IN_uuid, const char* IN_physical_volume, const char ** IN_options, org_freedesktop_UDisks_linux_lvm2_vg_add_pv_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2VGAddPV", org_freedesktop_UDisks_linux_lvm2_vg_add_pv_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_uuid, DBUS_TYPE_G_OBJECT_PATH, IN_physical_volume, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_vg_remove_pv (DBusGProxy *proxy, const char * IN_vg_uuid, const char * IN_pv_uuid, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2VGRemovePV", error, G_TYPE_STRING, IN_vg_uuid, G_TYPE_STRING, IN_pv_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_vg_remove_pv_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_vg_remove_pv_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_vg_remove_pv_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_vg_remove_pv_async (DBusGProxy *proxy, const char * IN_vg_uuid, const char * IN_pv_uuid, const char ** IN_options, org_freedesktop_UDisks_linux_lvm2_vg_remove_pv_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2VGRemovePV", org_freedesktop_UDisks_linux_lvm2_vg_remove_pv_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_vg_uuid, G_TYPE_STRING, IN_pv_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_lv_set_name (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_uuid, const char * IN_name, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2LVSetName", error, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_uuid, G_TYPE_STRING, IN_name, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_lv_set_name_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_lv_set_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_lv_set_name_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_lv_set_name_async (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_uuid, const char * IN_name, org_freedesktop_UDisks_linux_lvm2_lv_set_name_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2LVSetName", org_freedesktop_UDisks_linux_lvm2_lv_set_name_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_uuid, G_TYPE_STRING, IN_name, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_lv_start (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_uuid, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2LVStart", error, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_lv_start_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_lv_start_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_lv_start_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_lv_start_async (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_uuid, const char ** IN_options, org_freedesktop_UDisks_linux_lvm2_lv_start_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2LVStart", org_freedesktop_UDisks_linux_lvm2_lv_start_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_lv_remove (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_uuid, const char ** IN_options, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2LVRemove", error, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_lv_remove_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_lv_remove_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_lv_remove_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_lv_remove_async (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_uuid, const char ** IN_options, org_freedesktop_UDisks_linux_lvm2_lv_remove_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2LVRemove", org_freedesktop_UDisks_linux_lvm2_lv_remove_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_uuid, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_lvm2_lv_create (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_name, const guint64 IN_size, const guint IN_num_stripes, const guint64 IN_stripe_size, const guint IN_num_mirrors, const char ** IN_options, const char * IN_fstype, const char ** IN_fsoptions, char** OUT_created_device, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxLvm2LVCreate", error, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_name, G_TYPE_UINT64, IN_size, G_TYPE_UINT, IN_num_stripes, G_TYPE_UINT64, IN_stripe_size, G_TYPE_UINT, IN_num_mirrors, G_TYPE_STRV, IN_options, G_TYPE_STRING, IN_fstype, G_TYPE_STRV, IN_fsoptions, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_created_device, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_lvm2_lv_create_reply) (DBusGProxy *proxy, char *OUT_created_device, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_lvm2_lv_create_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char* OUT_created_device;
- dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_created_device, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_lvm2_lv_create_reply)data->cb) (proxy, OUT_created_device, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_lvm2_lv_create_async (DBusGProxy *proxy, const char * IN_group_uuid, const char * IN_name, const guint64 IN_size, const guint IN_num_stripes, const guint64 IN_stripe_size, const guint IN_num_mirrors, const char ** IN_options, const char * IN_fstype, const char ** IN_fsoptions, org_freedesktop_UDisks_linux_lvm2_lv_create_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxLvm2LVCreate", org_freedesktop_UDisks_linux_lvm2_lv_create_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_group_uuid, G_TYPE_STRING, IN_name, G_TYPE_UINT64, IN_size, G_TYPE_UINT, IN_num_stripes, G_TYPE_UINT64, IN_stripe_size, G_TYPE_UINT, IN_num_mirrors, G_TYPE_STRV, IN_options, G_TYPE_STRING, IN_fstype, G_TYPE_STRV, IN_fsoptions, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_md_start (DBusGProxy *proxy, const GPtrArray* IN_components, const char ** IN_options, char** OUT_device, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxMdStart", error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), IN_components, G_TYPE_STRV, IN_options, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_device, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_md_start_reply) (DBusGProxy *proxy, char *OUT_device, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_md_start_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char* OUT_device;
- dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_device, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_md_start_reply)data->cb) (proxy, OUT_device, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_md_start_async (DBusGProxy *proxy, const GPtrArray* IN_components, const char ** IN_options, org_freedesktop_UDisks_linux_md_start_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxMdStart", org_freedesktop_UDisks_linux_md_start_async_callback, stuff, _dbus_glib_async_data_free, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), IN_components, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_linux_md_create (DBusGProxy *proxy, const GPtrArray* IN_components, const char * IN_level, const guint64 IN_stripe_size, const char * IN_name, const char ** IN_options, char** OUT_device, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "LinuxMdCreate", error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), IN_components, G_TYPE_STRING, IN_level, G_TYPE_UINT64, IN_stripe_size, G_TYPE_STRING, IN_name, G_TYPE_STRV, IN_options, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_device, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_linux_md_create_reply) (DBusGProxy *proxy, char *OUT_device, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_linux_md_create_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char* OUT_device;
- dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_device, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_linux_md_create_reply)data->cb) (proxy, OUT_device, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_linux_md_create_async (DBusGProxy *proxy, const GPtrArray* IN_components, const char * IN_level, const guint64 IN_stripe_size, const char * IN_name, const char ** IN_options, org_freedesktop_UDisks_linux_md_create_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "LinuxMdCreate", org_freedesktop_UDisks_linux_md_create_async_callback, stuff, _dbus_glib_async_data_free, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), IN_components, G_TYPE_STRING, IN_level, G_TYPE_UINT64, IN_stripe_size, G_TYPE_STRING, IN_name, G_TYPE_STRV, IN_options, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_inhibit (DBusGProxy *proxy, char ** OUT_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "Inhibit", error, G_TYPE_INVALID, G_TYPE_STRING, OUT_cookie, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_inhibit_reply) (DBusGProxy *proxy, char * OUT_cookie, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_inhibit_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- char * OUT_cookie;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_STRING, &OUT_cookie, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_inhibit_reply)data->cb) (proxy, OUT_cookie, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_inhibit_async (DBusGProxy *proxy, org_freedesktop_UDisks_inhibit_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "Inhibit", org_freedesktop_UDisks_inhibit_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID);
-}
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-gboolean
-org_freedesktop_UDisks_uninhibit (DBusGProxy *proxy, const char * IN_cookie, GError **error)
-
-{
- return dbus_g_proxy_call (proxy, "Uninhibit", error, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID, G_TYPE_INVALID);
-}
-
-typedef void (*org_freedesktop_UDisks_uninhibit_reply) (DBusGProxy *proxy, GError *error, gpointer userdata);
-
-static void
-org_freedesktop_UDisks_uninhibit_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data)
-{
- DBusGAsyncData *data = (DBusGAsyncData*) user_data;
- GError *error = NULL;
- dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);
- (*(org_freedesktop_UDisks_uninhibit_reply)data->cb) (proxy, error, data->userdata);
- return;
-}
-
-static
-#ifdef G_HAVE_INLINE
-inline
-#endif
-DBusGProxyCall*
-org_freedesktop_UDisks_uninhibit_async (DBusGProxy *proxy, const char * IN_cookie, org_freedesktop_UDisks_uninhibit_reply callback, gpointer userdata)
-
-{
- DBusGAsyncData *stuff;
- stuff = g_slice_new (DBusGAsyncData);
- stuff->cb = G_CALLBACK (callback);
- stuff->userdata = userdata;
- return dbus_g_proxy_begin_call (proxy, "Uninhibit", org_freedesktop_UDisks_uninhibit_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_cookie, G_TYPE_INVALID);
-}
-#endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_UDisks */
-
-G_END_DECLS