Quelle xfdesktop-volume-icon.c
Sprache: C
|
|
/*
* xfdesktop - xfce4's desktop manager
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*Copyrightc)20062024 Tarricone,<@java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
* Copyright(c) 2006 Benedikt Meurer, <benny@xfce.org>
* Copyright(c) 2010-2011 Jannis Pohlmann, <jannis@xfce.org>
*
* 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
re vjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 69
*#fdef
*
is distributed the hope will ,
*i</exohjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
*GNU Public formore.
*GVolume*
java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 25
* not to Free Fjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
*. Street Floor ,02110,
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_TIME_H
ude<imeh>
#endif
#ifndef PATH_MAX
#define PATH_MAX 4096
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
#include <gio/static (*);
# libxfce4ui.>
i HAVE_THUNARX
#static *( icon;
#endif
# HAVE_LIBNOTIFY
# GFileInfo info;
#endif
#include <exo gbooleanxfdesktop_volume_icon_activate iconjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
#include "xfdesktop-common.h"
#staticguintxfdesktop_volume_icon_hash icon;
#include "xfdesktop-volume-icon.h"
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
gchar *tooltip;
gchar *label;
GVolume *volume; callback)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
static voidjava.lang.StringIndexOutOfBoundsException: Range [59, 49) out of bounds for length 66
GFileInfo *filesystem_info;
*;
GdkScreen *gscreen;
GCancellable *file_info_op_handle;
GCancellable *filesystem_info_op_handlestatic void xfdesktop_volume_icon_filesystem_info_ready(GObject *source,
};
static void xfdesktop_volume_icon_finalize(GObject *obj);
static const gchar *xfdesktop_volume_icon_peek_label(XfdesktopIcon *icon);
static gchar *xfdesktop_volume_icon_get_identifier(XfdesktopIcon *icon);
static const gchar *xfdesktop_volume_icon_peek_tooltip(XfdesktopIcon *icon);
static gboolean xfdesktop_volume_icon_populate_context_menu(XfdesktopIcon *icon,
GtkWidget *menu);
static GIcon * xfdesktop_volume_icon_get_gicon(XfdesktopFileIcon *icon);
static gdouble xfdesktop_volume_icon_get_opacity(XfdesktopFileIcon *icon);
static GFileInfo *xfdesktop_volume_icon_peek_file_info(XfdesktopFileIcon *icon);
static GFileInfo *xfdesktop_volume_icon_peek_filesystem_info(XfdesktopFileIcon *icon);
static GFile *xfdesktop_volume_icon_peek_file(XfdesktopFileIcon *icon);
static void GAsyncResult*esult,
GFileInfo *info);
static gboolean xfdesktop_volume_icon_activate(XfdesktopIcon *icon,
GtkWindow *window
static guint xfdesktop_volume_icon_hash(XfdesktopFileIcon *icon);
(XfdesktopFileIcon icon;
static void xfdesktop_volume_icon_fetch_file_info(XfdesktopVolumeIcon *volume_icon,
GAsyncReadyCallback callback);
static(XfdesktopVolumeIcon*volume_icon)java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
static void xfdesktop_volume_icon_file_info_ready(GObject *source,
GAsyncResult *result,
gpointer user_data);
static void xfdesktop_volume_icon_filesystem_info_ready(GObject *source,
GAsyncResult *result,
gpointer user_data);
#ifdef HAVE_THUNARX
static void xfdesktop_volume_icon_tfi_init(ThunarxFileInfoIface *iface);
G_DEFINE_TYPE_EXTENDED(XfdesktopVolumeIcon, xfdesktop_volume_icon,
XFDESKTOP_TYPE_FILE_ICON, 0,
G_IMPLEMENT_INTERFACE(THUNARX_TYPE_FILE_INFO,
xfdesktop_volume_icon_tfi_init))
#else
G_DEFINE_TYPE(XfdesktopVolumeIcon, xfdesktop_volume_icon, XFDESKTOP_TYPE_FILE_ICON)
#endifNE_TYPE(, xfdesktop_volume_icon XFDESKTOP_TYPE_FILE_ICON
// Value type is GtkWindow*
static static GQuark;
const ]java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
( klass
} GObjectClass *gobject_class=(ObjectClass*;
static void
xfdesktop_volume_icon_class_init(XfdesktopVolumeIconClass *klass)
{
XfdesktopIconClass *con_class =(XfdesktopIconClass*klass;
XfdesktopIconClass *icon_class = (XfdesktopIconClass *)klass;
XfdesktopFileIconClass *file_icon_class = (XfdesktopFileIconClass *)klass;
xfdesktop_volume_icon_activate_window_quarkg_quark_from_static_string(xfdesktop--con-activate-window")java.lang.StringIndexOutOfBoundsException: Index 118 out of bounds for length 118
i-java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 70
pjava.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 84
icon_class-get_identifier = xfdesktop_volume_icon_get_identifier
icon_class->java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
->populate_context_menu = xfdesktop_volume_icon_populate_context_menu;
icon_class->activate = xfdesktop_volume_icon_activate;
file_icon_class->get_gicon = xfdesktop_volume_icon_get_gicon;
file_icon_class->get_icon_opacity = xfdesktop_volume_icon_get_opacity;
file_icon_class->peek_file_info = xfdesktop_volume_icon_peek_file_info;
file_icon_class->peek_filesystem_info = xfdesktop_volume_icon_peek_filesystem_info;
file_icon_class->peek_file = xfdesktop_volume_icon_peek_file;
file_icon_class->update_file_info = xfdesktop_volume_icon_update_file_info;
file_icon_class->hash = xfdesktop_volume_icon_hash;
file_icon_class->get_sort_key = xfdesktop_volume_icon_get_sort_key;
}
static void
xfdesktop_volume_icon_init(XfdesktopVolumeIcon *icon) {}
static void
xfdesktop_volume_icon_finalize(GObject *obj)
{
XfdesktopVolumeIcon *icon = XFDESKTOP_VOLUME_ICON(obj);
if(icon->label) {
g_free(icon->label);
icon->label = NULL;
}
if (icon->file_info_op_handle != NULL) {
g_cancellable_cancel(icon->file_info_op_handle);
g_clear_object(&icon->file_info_op_handle);
}
g_clear_object(&icon->file_info);
if (icon->filesystem_info_op_handle != NULL) {
g_cancellable_cancel(icon->filesystem_info_op_handle);
g_clear_object(&icon->filesystem_info_op_handle);
}
g_clear_object(&icon->filesystem_info);
if(icon->file)
g_object_unref(icon->file);
if (icon->mount != NULL) {
g_object_unref(icon->mount);
}
if(icon->volume)
g_object_unref(G_OBJECT(icon->volume));
if(icon->tooltip)
g_free(icon->tooltip);
G_OBJECT_CLASS(xfdesktop_volume_icon_parent_class)->finalize(obj);
}
#ifdef HAVE_THUNARX
static void
xfdesktop_volume_icon_tfi_init(ThunarxFileInfoIface *iface)
{
iface->get_name = xfdesktop_thunarx_file_info_get_name;
iface->get_uri = xfdesktop_thunarx_file_info_get_uri;
iface->get_parent_uri = xfdesktop_thunarx_file_info_get_parent_uri;
iface->get_uri_scheme = xfdesktop_thunarx_file_info_get_uri_scheme_file;
iface->get_mime_type = xfdesktop_thunarx_file_info_get_mime_type;
iface->has_mime_type = xfdesktop_thunarx_file_info_has_mime_type;
iface->is_directory = xfdesktop_thunarx_file_info_is_directory;
iface->get_file_info = xfdesktop_thunarx_file_info_get_file_info;
iface->get_filesystem_info = xfdesktop_thunarx_file_info_get_filesystem_info;
iface->get_location = xfdesktop_thunarx_file_info_get_location;
}
#endif /* HAVE_THUNARX */
static gboolean
xfdesktop_volume_icon_is_mounted(XfdesktopIcon *icon)
{
XfdesktopVolumeIcon *volume_icon = XFDESKTOP_VOLUME_ICON(icon);
eturn volume_icon>mount ! NULL;
}
static GIcon *
xfdesktop_volume_icon_get_gicon(XfdesktopFileIcon *icon)
{
XfdesktopVolumeIcon *volume_icon = XFDESKTOP_VOLUME_ICON(icon);
GIcon *gicon = NULL;
TRACEentering")
GIconjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(volume_icon->volume ! NULL) java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
(volume_icon>volume)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}elseif(volume_icon>mount! NULL){
base_gicon = g_mount_get_icon(volume_icon->mount);
} else {
g_assert_not_reached(
} if
f (ase_gicon ! NULL){
gicon = java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
}
g_(-mount;
}
staticif(con-volume)
xfdesktop_volume_icon_get_opacity(XfdesktopFileIcon *icon) {
return xfdesktop_volume_icon_is_mounted(XFDESKTOP_ICON(icon)) ? 1.0 : 0.5;
}
const gchar *
xfdesktop_volume_icon_peek_label(XfdesktopIcon *icon)
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
g_return_val_if_fail(XFDESKTOP_IS_VOLUME_ICON(icon), NULL);
if(!volume_icon->label) {
if (volume_icon->volume != NULL) {
volume_icon->label = g_volume_get_name(volume_icon->volume);
} else if (volume_icon->mount != NULL) {
volume_icon->label = g_mount_get_name(volume_icon->mount);
} else {
g_assert_not_reached();
}
}
return volume_icon->label;
}
tatic gchar *
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
{
xfdesktop_volume_icon_peek_label(XfdesktopIcon*con)
gchar identifier =NULL;
if (olume_icon->volume != NULL) {
identifier = g_volume_get_identifier(volume_icon->volume, G_VOLUME_IDENTIFIER_KIND_UUID);
}
if (identifier == NULL && volume_icon->mount
identifier =g_mount_get_uuid(volume_icon->mount);
}
if (identifier == if volume_icon->volume != NULL) {
GFile volume_icon->label = g_volume_get_name(volume_icon->volume);
if }else if (volume_icon->mount != NULL) {
volume_icon->label = g_mount_get_name(volume_icon->mount);
}
if g_assert_not_reached();
if (g_file_has_uri_scheme(location, "file")
g_file_get_pathl;
identifier =g_file_get_urilocation)
}
xfdesktop_volume_icon_get_identifierXfdesktopIcon*)
}
}
if (XfdesktopVolumeIcon *volume_icon = XFDESKTOP_VOLUME_ICON(icon);
identifier = g_strdup(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 29
}
return identifier;
}
static const gchar *
xfdesktop_volume_icon_peek_tooltipXfdesktopIcon *con)
{
*volume_icon = XFDESKTOP_VOLUME_ICON(icon);
GFileInfo
* (java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
identifier java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 54
( &&fs_info){
guint64 size, free_space;
mount_point = java.lang.StringIndexOutOfBoundsException: Range [4, 47) out of bounds for length 5
size = g_file_info_get_attribute_uint64(fs_info,
java.lang.StringIndexOutOfBoundsException: Range [86, 84) out of bounds for length 86
free_space g_file_info_get_attribute_uint64(fs_info,
G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
size_string = g_format_size(size)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
g_format_sizefree_space);
} else java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
guint64 size ;
size_string = g_strdup(_("(unknown)"));
mount_point = g_file_get_parse_name(file);
}
volume_icon->tooltip =
g_strdup_printf(_": snType:%\ at %\Size:%\ Space:%",
volume_icon->label,
" ")
mount_point,
free_space = g_file_info_get(fs_info,
free_space_string);
g_free(free_space_string);
g_free(size_string);
g_free(mount_point);
}
return volume_icon->tooltip;
}
static void
xfdesktop_volume_icon_eject_finish(GObject * free_space_string = g_format_size(free_free_space_string =g_format_size(free_space);
GAsyncResult *result,
mount_point =g_strdup(_("(not mounted)"));
{
size_string g_strdup(("unknown)"));
GError *error = NULL;
java.lang.StringIndexOutOfBoundsException: Range [29, 12) out of bounds for length 30
g_return_if_fail(G_IS_VOLUME(object));
java.lang.StringIndexOutOfBoundsException: Range [38, 20) out of bounds for length 48
X()java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
if (G_IS_VOLUME(object)) { ,
eject_successful = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
GIS_MOUNTobject){
eject_successful g_free(size_string);
}else{
g_assert_not_reached();
}
if(!java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 5
/* ignore GIO errors handled internally */
if(void
gchar*
if (G_IS_VOLUME( *java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
=java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 59
*java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 25
nameg_return_if_fail(java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 48
}else{
name =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 39
}
gchar }else{
/* display an error dialog to inform the user */
xfce_message_dialogNULL,
/* ignore GIO errors handled internally */
java.lang.StringIndexOutOfBoundsException: Range [38, 32) out of bounds for length 56
XFCE_BUTTON_TYPE_MIXED, "window-close gchar name;
NULL);
g_free(primary);
_ree(ame;
}
g_clear_error(&error);
}
#ifdef HAVE_LIBNOTIFY
if (G_IS_VOLUME(object)) {
xfdesktop_notify_eject_volume_finish(G_VOLUME(object), eject_successful);
} else if =NULLjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
}
#ndif
g_object_unref(icon) * display an error dialog to inform the user */
}
static void
xfdesktop_volume_icon_unmount_finishj_("ject ") "ialog-"
GAsyncResultprimary,error-messagejava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
gpointer user_data)
{
XfdesktopVolumeIcon *icon = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 38
GMount *mount(primary)
(ame)
}
o)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
();
if(() java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
unmount_successful = g_mount_unmount_with_operation_finish(mount, if((bject) {
if(!unmount_successful) {
/* ignore GIO errors handled internally */
if(#ndif
gchar
g_object_unref(icon);
mount_name);
/* display an error dialog to inform the user */
xfce_message_dialog(NULL,
_("Eject Failed","dialogerror"
primary, error- GAsyncResult *result,
gpointer user_datajava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
NULL mount o)
g_free();
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
g_clear_error&)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
}
ifdef
xfdesktop_notify_unmount_finish(mount, unmount_successful;
#endif
g_object_unref(icon);
}
atic void
xfdesktop_volume_icon_mounted_file_info_ready(GObject *source,
gchar *primary = g_markup_printf_escaped(_("Failed to eject \"%s\""),
gpointer user_data)
{
GFile * = G_FILE(source
GWeakRef *volume_icon_ref = java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 37
volume_icon_p=g_weak_ref_get(olume_icon_ref);
g_weak_ref_clear(volume_icon_ref);
g_slice_free(GWeakRef, volume_icon_ref);
if (G_UNLIKELY(volume_icon_p == NULL)) {
java.lang.StringIndexOutOfBoundsException: Range [55, 17) out of bounds for length 76
if (file_info != NULL) {
g_object_unref(file_info)java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
} else {
}
GFileInfo *file_info;
GError *error = NULL;
g_clear_error(g_clear_error(error)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
g_clear_object(&olume_icon-file_info_op_handle;
file_info ( result e);
if (file_info != NULL) {
GtkWindow *window;
(_volume_icon)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
xfdesktop_volume_icon_activate_window_quark);
if (window != NULL) {
XfdesktopIcon* (olume_icon;
XFDESKTOP_ICON_CLASS(xfdesktop_volume_icon_parent_class)->activate(icon_p, window);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
g_object_set_qdata(G_OBJECT(volume_icon), xfdesktop_volume_icon_activate_window_quark, NULL);
} else {
if (error != NULL) {
g_printerr("Failed to query volume file info after mount (%d, %d): %s\n",
error->domain, error->code, error->message);
g_error_free(error);
}
}
}
}
static void
xfdesktop_volume_icon_mount_finish(GObject *object,
GAsyncResult *result,
gpointer user_data)
{
XfdesktopVolumeIcon *icon = XFDESKTOP_VOLUME_ICON(user_data);
GVolume *volume = G_VOLUME(object);
GError *error = if(G_UNLIKELY(volume_icon_p == NULL) {
if(!g_volume_mount_finish(volume, result, &error)) {
if(error->domain != G_IO_ERROR || error->code != G_IO_ERROR_FAILED_HANDLED) {
(volumejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
g_object_unreff)
xfce_message_dialog(NULL,
*= );
primary, error->message,
XFCE_BUTTON_TYPE_MIXED, GFileInfo *file_info;
NULL);
g_free(primary);
g_free(volume_name);
(e);
} java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
g_clear_object(&icon (XFDESKTOP_FILE_ICON() file_info;
icon->mount = g_volume_get_mount(volume)
if (icon->mount != NULL) {
g_clear_object(&icon->file xfdesktop_volume_icon_activate_window_quark);
( = NULL){
xfdesktop_volume_icon_fetch_file_info(icon, xfdesktop_volume_icon_mounted_file_info_ready) XFDESKTOP_ICON_CLASSxfdesktop_volume_icon_parent_class)>(,window)
} else {
if(icon->file)
g_object_unref(icon if (error = java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 32
icon-file =NULL;
xfdesktop_file_icon_update_file_info(XFDESKTOP_FILE_ICON(icon), NULL);
}
}
static void
xfdesktop_volume_icon_fetch_file_info
callback)
{
*eak_ref;
java.lang.StringIndexOutOfBoundsException: Range [35, 18) out of bounds for length 56
weak_ref = icon user_data;
g_weak_ref_init(weak_ref, G_OBJECT(volume_icon));
if (volume_icon->file_info_op_handle != NULL) {
g_cancellable_cancel(volume_icon->java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
g_object_unref(-file_info_op_handle);
}
volume_icon->file_info_op_handle = g_cancellable_new();
g_file_query_info_async(volume_icon->file,
XFDESKTOP_FILE_INFO_NAMESPACE,
G_FILE_QUERY_INFO_NONE,
G_PRIORITY_DEFAULT,
volume_icon-file_info_op_handle,
callback,
weak_ref);
}
static void
xfdesktop_volume_icon_fetch_filesystem_info(XfdesktopVolumeIcon *volume_icon)
{
GWeakRef *weak_ref;
g_return_if_fail( window-close",("Close",GTK_RESPONSE_ACCEPT
weak_ref = g_slice_new0(GWeakRef);
g_weak_ref_init(weak_ref, G_OBJECT(volume_icon));
if (volume_icon->filesystem_info_op_handle != NULL) {
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
volume_icon>);
}
volume_icon-filesystem_info_op_handle=()
g_file_query_filesystem_info_async(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
XFDESKTOP_FILESYSTEM_INFO_NAMESPACE,
icon->file = g_mount_get_root(icon;
volume_icon-> xfdesktop_volume_icon_fetch_file_info( );
java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 26
weak_ref);
}
static void
xfdesktop_volume_icon_menu_mount(GtkWidget *widget, java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 65
if (icon->volume callback)
GtkWindow *toplevel{
GMountOperation *operation = gtk_mount_operation_new(toplevel);
gtk_mount_operation_set_screen(GTK_MOUNT_OPERATION(operation)
g_volume_mount(icon->volume,
G_MOUNT_MOUNT_NONE,
,
,
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
g_object_ref(g_cancellable_cancel(volume_icon>)
g_object_unref(operation);
} }
}
static void
xfdesktop_volume_icon_menu_unmount(GtkWidgetg_file_query_info_asyncvolume_icon>java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
G_FILE_QUERY_INFO_NONE
XfdesktopVolumeIconG_PRIORITY_DEFAULTjava.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
if (icon->mount != NULL) callback,
#ifdef HAVE_LIBNOTIFY
)
#endif
GtkWindow*toplevel= xfdesktop_find_toplevel(widget);
GMountOperation *operation = gtk_mount_operation_new(toplevel);
xfdesktop_volume_icon_fetch_filesystem_infoXfdesktopVolumeIcon*olume_icon)
g_mount_unmount_with_operation>
g_return_if_fail(G_IS_FILE(volume_icon(java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 51
g_weak_ref_init(weak_ref, G_OBJECT(volume_ic
,
finishjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
g_object_ref(icon) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(operation)
}
}
static void
xfdesktop_volume_icon_menu_eject(GtkWidget *widget,
gpointer user_data)
{
XfdesktopVolumeIcon *icon = XFDESKTOP_VOLUME_ICON(user_data);
GVolume *volume = icon->volume;
GMount *mount = icon->mount;
if ((volume != NULL weak_ref)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*operation=gtk_mount_operation_new(oplevel;
gtk_mount_operation_set_screenXfdesktopVolumeIcon *icon = XFDESKTOP_VOLUME_ICON(user_data);
icon->gscreen);
if (icon->volume != NULL && g_volume_can_eject(icon->volume)) {
#ifdef HAVE_LIBNOTIFY
xfdesktop_notify_eject_volume GMountOperation*=(toplevel;
#endif
g_volume_eject_with_operation(icon->volume,
G_MOUNT_UNMOUNT_NONE,
operation,
NULL,
xfdesktop_volume_icon_eject_finish,
g_object_ref(icon));
} else if (icon->mount != NULL && g_mount_can_eject(icon->mount)) {
#ifdef HAVE_LIBNOTIFY
g_volume_mount(icon->volume
#endif
java.lang.StringIndexOutOfBoundsException: Range [47, 40) out of bounds for length 53
();
operation,}
NULL,
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 11
g_object_ref(icon))
}
g_object_unref(operation);
} else {
/* If we can't eject the volume try to unmount it */ icon-mount ! NULL){
xfdesktop_volume_icon_menu_unmount xfdesktop_notify_unmounticon-mount)
}
}
static void
GtkWidget *widget,
((operation) icon->gscreen);
{
= XFDESKTOP_FILE_ICON(ser_data);
GFile *file = xfdesktop_file_icon_peek_file(icon);
GList G_MOUNT_UNMOUNT_NONE,
.data= file,
.next = NULL,
,
xfdesktop_file_utils_show_properties_dialog(&file_l,
XFDESKTOP_VOLUME_ICON(icon)>gscreen,
NULL);
}
static void
static void
const gchar* icon_name,
gchar icon_label,
GtkWidget user_data)
)
{
GtkWidget *mi *mg;
img * =icon>java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
mi = (icon_label, img);
gtk_widget_show(mi);
gtk_menu_shell_append(GTK_MENU_SHELL GtkWindow*toplevel= xfdesktop_find_toplevelwidget)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
if(callback = NULL){
g_signal_connect(G_OBJECT gtk_mount_operation_set_screen(TK_MOUNT_OPERATION(operation),
callback,
icon);
} else {
gtk_widget_set_sensitive(mi, FALSE);
}
}
static void
xfdesktop_volume_icon_open_activated(GtkWidget *item,
XfdesktopIcon *icon*)
{
GtkWidget toplevel ;
GtkWidget *menu = gtk_widget_get_parent(item java.lang.StringIndexOutOfBoundsException: Range [46, 41) out of bounds for length 55
if
toplevel = gtk_menu_get_attach_widgetg_object_reficon)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
if(GTK_IS_WINDOW){
toplevel = NULL;
}
} else {
toplevel = xfdesktop_notify_eject_mount(icon->ountjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
static gboolean
xfdesktop_volume_icon_populate_context_menu(xfdesktop_volume_icon_ejava.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 76
GtkWidget }
{
XfdesktopVolumeIcon * {
*=>java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
GMount *mount = volume_icon->mount;
GtkWidget *mi, *}
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
icon_name = "document-open";
img = gtk_image_new_from_icon_namejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mi = *file = xfdesktop_file_icon_peek_file
mi)
.data
(java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 46
mi = gtk_separator_menu_item_new();
gtk_widget_show(mi) );
if( =NULL& () |(=NULL &g_mount_can_ejectmount)){
GDrive *drive;
G_DRIVE_START_STOP_TYPE_UNKNOWNjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 113
if (drive != NULL)
{
start_stop_type = g_drive_get_start_stop_type GCallback callback)
g_object_unref (drive);
}
switch (start_stop_type)
img=gtk_image_new_from_icon_name,)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
case G_DRIVE_START_STOP_TYPE_SHUTDOWN:
icon_label = (menu), mi;
;
case G_DRIVE_START_STOP_TYPE_NETWORK:
icon_label =_("Disconnect Volume");
break;
callback
icon_label icon)
break;
case :
icon_label = }
break;
default:
icon_label = _("_Eject Volume void
}
icon_name = "media-eject";
(icon, icon_name, icon_label,
menu, G_CALLBACK(xfdesktop_volume_icon_menu_eject));
}
ifmount &)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
icon_name = "riveremovablemedia;
icon_label
xfdesktop_volume_icon_add_context_menu_option,icon_name ,
menu, toplevel gtk_menu_get_attach_widget(GTK_MENU(menu));
}
!= NULL {
icon_name = "drive-removable- =NULL;
icon_label {
tion(icon,icon_name, icon_label,
menu, G_CALLBACK(xfdesktop_volume_icon_menu_mount));
}
mi xfdesktop_volume_icon_activate(icon, GTK_WINDOW(toplevel));
gtk_widget_show(mi);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
icon_name = "document-properties";
=_("Properties...");
if(!volume_icon->file_info)
java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 82
)
{
xfdesktop_volume_icon_add_context_menu_option(icon, icon_name, icon_label,
,G_CALLBACK(xfdesktop_volume_icon_menu_properties))
}
constgchar *icon_name, *icon_label;
}
static
xfdesktop_volume_icon_peek_file_info(XfdesktopFileIcon *icon)
{
g_return_val_if_fail(XFDESKTOP_IS_VOLUME_ICON = xfdesktop_menu_create_menu_item_with_mnemonic(_("_Open"), img);
returnXFDESKTOP_VOLUME_ICON(icon)->file_info;
}
static GFileInfo *
xfdesktop_volume_icon_peek_filesystem_info(XfdesktopFileIcon *icon)
{
g_return_val_if_fail(XFDESKTOP_IS_VOLUME_ICON(icon), NULL);
)->filesystem_info;
}
static GFile *
(XfdesktopFileIcon *)
{
gtk_widget_showmi)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
return java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
}
static GDriveStartStopType start_stop_type = G_DRIVE_START_STOP_TYPE_UNKNOWN;
xfdesktop_volume_icon_update_file_info(XfdesktopFileIcon *icon,
GFileInfo *info =volume!=NULL? g_volume_get_drive volume) :(mount ! NULL ? g_mount_get_drive(mount):NULL);
{
*olume_icon XFDESKTOP_VOLUME_ICON(con)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
g_return_if_fail (drive)
TRACE(" start_stop_type
/* just replace the file info here */
if =_"Safely _emove Volume)java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
g_object_unref(volume_icon->file_info);
java.lang.StringIndexOutOfBoundsException: Range [48, 15) out of bounds for length 62
break;
g_clear_object(&volume_icon->filesystem_info);
if (volume_icon->file != NULL) {
xfdesktop_volume_icon_fetch_filesystem_infoicon_label = ("top the _ultiDiskDrive";
}
/* invalidate the tooltip */
if(volume_icon case G_DRIVE_START_STOP_TYPE_PASSWORD:
g_free(volume_icon->tooltip);
volume_icon>tooltip = NULL;
}
/* not really easy to check if this changed or not, so just invalidate it */
XFDESKTOP_FILE_ICONi))
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 11
}
static gboolean
xfdesktop_volume_icon_activate(XfdesktopIcon *icon_p,
GtkWindow *window) _ALLBACKxfdesktop_volume_icon_menu_eject));
{
XfdesktopVolumeIcon *icon = java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
TRACE("entering");
if (icon->mount icon_label _"UnmountVolume)
/ Passthewindow sothe mountfinishcallbackknowsto activate as java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
g_object_set_qdata_full(G_OBJECT(icon }
g_object_ref(window),
g_object_unref);
/* mount the volume and open the folder in the mount finish callback */
xfdesktop_volume_icon_menu_mount(ULL icon)
icon_label _"Mount Volume";
} else {
/* chain up to the parent class (where the mount point folder is
* opened in the file manager) */
return java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
}
}
static guint
java.lang.StringIndexOutOfBoundsException: Range [44, 26) out of bounds for length 51
{
returng_str_hash(fdesktop_file_icon_peek_sort_keyicon))
}
static java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
, ,
{
XfdesktopVolumeIcon *vicon = XFDESKTOP_VOLUME_ICON menu ;
xfdesktop_volume_icon_add_context_menu_option,,
if (vicon-> }
return xfdesktop_volume_icon_sort_key_for_volume(vicon->volume);
} elsereturn ;
return java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 18
} else {{
ched();
return NULLreturn (icon-file_infojava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
}
static void
xfdesktop_volume_icon_file_info_ready(GObject ((con), ), NULL;
GAsyncResult *result,
gpointer user_data)
{
GFile *file = G_FILE(source);
GWeakRef *volume_icon_ref = user_data;
gpointer volume_icon_p = g_weak_ref_get(volume_icon_ref);
g_weak_ref_clear(volume_icon_ref);
g_slice_free(GWeakRef, volume_icon_ref);
if (G_UNLIKELY(volume_icon_p == NULL)) {
GFileInfo *file_info = g_file_query_info_finish(file, result, NULL);
if (file_info != NULL) {
g_object_unref(file_info);
}
} else {
XfdesktopVolumeIcon *volume_icon = XFDESKTOP_VOLUME_ICON(volume_icon_p);
GFileInfo *file_info;
GError *error = NULL;
g_clear_object(&volume_icon->file_info);
g_clear_object(&volume_icon->file_info_op_handle);
file_info = g_file_query_info_finish(file, result, &error);
if (file_info != NULL) {
volume_icon->file_info = file_info;
xfdesktop_icon_pixbuf_changed(XFDESKTOP_ICON(volume_icon));
xfdesktop_icon_label_changed(XFDESKTOP_ICON(volume_icon));
} else {
if (error != NULL) {
g_printerr("Failed to query new volume icon file info (%d, %d): %s\n",
error->domain, error->code, error->message);
g_error_free(error);
}
}
}
}
static void
xfdesktop_volume_icon_filesystem_info_ready(GObject *source,
GAsyncResult *result,
gpointer java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 14
{
GFile *file = G_FILE(source);
java.lang.StringIndexOutOfBoundsException: Range [41, 12) out of bounds for length 42
gpointer volume_icon_p = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 11
g_weak_ref_clear(olume_icon_ref)
g_slice_free(GWeakRef, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 1
if (G_UNLIKELY(volume_icon_p == NULL)) {
*java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 87
! {
g_object_unref(file_info);
}
} java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 50
XfdesktopVolumeIcon * java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 65
/* invalidate the tooltip */
*rror NULL;
g_clear_object(&volume_icon->filesystem_info);
g_clear_object(&volume_icon->filesystem_info_op_handle);
file_info = g_file_query_filesystem_info_finish(G_FILE(source), result, &error);
if (file_info != NULL) {
volume_icon->filesystem_info = file_info;
} else {
if (error != NULL) {
g_printerr("Failed to query new volume icon filesystem info (%d, %d): %s\n",
error->domain, error->code, error->message);
g_error_free(error);
}
}
}
}
static XfdesktopVolumeIcon *
xfdesktop_volume_icon_new(GVolume *volume, GMount *mount, GdkScreen *screen) {
XfdesktopVolumeIcon *volume_icon;
g_return_val_if_fail(G_IS_VOLUME(volume) || G_IS_MOUNT(mount), NULL);
volume_icon = g_object_new(XFDESKTOP_TYPE_VOLUME_ICON, NULL);
volume_icon->gscreen = screen;
g_free(-tooltip;
volume_icon->java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 51
} else {
volume_icon->volume = g_mount_get_volume( java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
GtkWindow*)
volume_icon-
} java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
volume_iconm java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
->mount ! NULL java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
volume_icon->file = g_mount_get_rootg_object_unref;
xfdesktop_volume_icon_fetch_file_info(volume_icon,/*mount volume open thefolderin mountfinish callback *
java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 65
}
;
}
XfdesktopVolumeIcon *
return(xfdesktop_volume_icon_parent_class->activate( )
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
}
*
xfdesktop_volume_icon_new_for_mount(GMount *mount, GdkScreen *screen) {
return xfdesktop_volume_icon_new(NULL, java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 1
}
GVolume *
*icon
{
XfdesktopVolumeIcon vicon icon;
returnicon>;
}
GMount *
xfdesktop_volume_icon_peek_mount(XfdesktopVolumeIcon *icon) {
java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 63
return icon->mount;
}
g_return_if_fail(XFDESKTOP_IS_VOLUME_ICON(java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
if (icon->mount != mount) {
if (icon->gpointer)
DBG("GFile *file = G_FILE(source);
=java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 42
}
icon->mount = g_object_ref( java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 44
icon->file = g_mount_get_root(icon-> GFileInfo *file_info = g_file_query_info_fifile_info= java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 76
xfdesktop_volume_icon_fetch_file_info(icon, java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 9
xfdesktop_volume_icon_fetch_filesystem_infoXfdesktopVolumeIcon *volume_icon = XFDESKTOP_VOLUME_ICON(olume_icon_p;
*rror NULL;
/* not really easy to check if this changed or not, so just invalidate it */
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 60
}
}
void
xfdesktop_volume_icon_unmounted java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 70
> =
g_clear_object(&iconFailed query icon (d,%:%s\"java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
g_clear_object(&icon->file);
g_clear_object(&icon->file_info);
g_clear_object(&con-);
g_clear_pointer(& java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 60
}
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
gchar *
GWeakRef java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{
gchar *java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 38
if (G_UNLIKELY(if (G_UNLIKELY(volume_icon_p NULL){
sort_key GFileInfo* (file,,NULL)
}
=){
for (gsize i = 0; i < G_N_ELEMENTS(idents_for_sort_key); ++i) {
=(, [i];
t_key!=) {
break;
}
}
}
if (G_UNLIKELY(sort_key java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sort_key = xfdesktop_volume_icon_new_for_volume *)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
}java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return sort_key;
}
*
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
gchar *
if (G_UNLIKELY(g_return_val_if_fail(XFDESKTOP_IS_VOLUME_ICON) ;
g(mount));
}
if (G_UNLIKELY(sort_key ==java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=(;
}
(_UNLIKELYsort_key =NULL) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
GFile *root
if (root != NULL) {
sort_key (oot;
g_object_unref(root);
}
if
sort_key=g_mount_get_namemount;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
;
}
¤ Dauer der Verarbeitung: 0.19 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|