mirror of
https://github.com/rozniak/xfce-winxp-tc.git
synced 2026-01-26 11:39:44 +00:00
Enhancement: Fixes #413, shell - cut / copy / paste support
This commit is contained in:
@@ -293,7 +293,7 @@ static void refresh_wallpaper_list(
|
||||
|
||||
if (!wnd->list_wallpapers)
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, GTK_WINDOW(wnd));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ static void on_listbox_wallpapers_row_selected(
|
||||
|
||||
if (!wnd->pixbuf_wallpaper)
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, GTK_WINDOW(wnd));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ static void action_apply(
|
||||
|
||||
if (!wintc_cpl_desk_settings_apply(wnd->settings, &error))
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, GTK_WINDOW(wnd));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ static gboolean on_window_map_event(
|
||||
|
||||
if (!wintc_cpl_desk_settings_load(wnd->settings, &error))
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, GTK_WINDOW(wnd));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,9 +73,10 @@ static void do_navigation_local(
|
||||
WinTCExplorerWindow* wnd,
|
||||
const gchar* specified_path
|
||||
);
|
||||
static void prepare_new_location(
|
||||
static gboolean prepare_new_location(
|
||||
const gchar* specified_path,
|
||||
WinTCShextPathInfo* local_path_info
|
||||
WinTCShextPathInfo* local_path_info,
|
||||
GError** error
|
||||
);
|
||||
static void switch_mode_to(
|
||||
WinTCExplorerWindow* wnd,
|
||||
@@ -701,7 +702,7 @@ static void do_navigation(
|
||||
|
||||
if (!regex_looks_webish)
|
||||
{
|
||||
wintc_display_error_and_clear(&error);
|
||||
wintc_display_error_and_clear(&error, GTK_WINDOW(wnd));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -785,10 +786,19 @@ static void do_navigation_local(
|
||||
&(wnd->local_path)
|
||||
);
|
||||
|
||||
prepare_new_location(
|
||||
specified_path,
|
||||
&path_info
|
||||
);
|
||||
if (
|
||||
!prepare_new_location(
|
||||
specified_path,
|
||||
&path_info,
|
||||
&error
|
||||
)
|
||||
)
|
||||
{
|
||||
wintc_nice_error_and_clear(&error, GTK_WINDOW(wnd));
|
||||
wintc_shext_path_info_free_data(&path_info);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Attempt the navigation
|
||||
//
|
||||
@@ -807,24 +817,23 @@ static void do_navigation_local(
|
||||
}
|
||||
else
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, GTK_WINDOW(wnd));
|
||||
}
|
||||
|
||||
wintc_shext_path_info_free_data(&path_info);
|
||||
}
|
||||
|
||||
static void prepare_new_location(
|
||||
static gboolean prepare_new_location(
|
||||
const gchar* specified_path,
|
||||
WinTCShextPathInfo* local_path_info
|
||||
WinTCShextPathInfo* local_path_info,
|
||||
GError** error
|
||||
)
|
||||
{
|
||||
GError* error = NULL;
|
||||
const GRegex* regex_uri_scheme = wintc_regex_uri_scheme(&error);
|
||||
const GRegex* regex_uri_scheme = wintc_regex_uri_scheme(error);
|
||||
|
||||
if (!regex_uri_scheme)
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// If the path starts with '::' then assume it's a GUID and shouldn't be
|
||||
@@ -836,7 +845,7 @@ static void prepare_new_location(
|
||||
|
||||
local_path_info->base_path = g_strdup(specified_path);
|
||||
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// If the path starts with a leading slash '/' then assume an absolute file
|
||||
@@ -849,7 +858,7 @@ static void prepare_new_location(
|
||||
local_path_info->base_path =
|
||||
g_strdup_printf("file://%s", specified_path);
|
||||
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// If the path is a URL, handle it here
|
||||
@@ -869,7 +878,7 @@ static void prepare_new_location(
|
||||
|
||||
local_path_info->base_path = g_strdup(specified_path);
|
||||
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Here we assume it's a relative path
|
||||
@@ -878,6 +887,8 @@ static void prepare_new_location(
|
||||
g_free(local_path_info->extended_path);
|
||||
|
||||
local_path_info->extended_path = g_strdup(specified_path);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void switch_mode_to(
|
||||
|
||||
@@ -868,7 +868,7 @@ static void refresh_personal_menu(
|
||||
|
||||
if (!garcon_menu_load(all_entries, NULL, &error))
|
||||
{
|
||||
wintc_display_error_and_clear(&error);
|
||||
wintc_display_error_and_clear(&error, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -970,7 +970,7 @@ static void on_button_power_clicked(
|
||||
|
||||
if (!wintc_launch_action(GPOINTER_TO_INT(user_data), &error))
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -997,7 +997,7 @@ static void on_event_box_userpic_clicked(
|
||||
"Cannot edit user pic yet!"
|
||||
);
|
||||
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, NULL);
|
||||
}
|
||||
|
||||
static void on_menu_item_launcher_activate(
|
||||
@@ -1027,7 +1027,7 @@ static void on_menu_item_launcher_activate(
|
||||
|
||||
if (error)
|
||||
{
|
||||
wintc_nice_error_and_clear(&error);
|
||||
wintc_nice_error_and_clear(&error, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user