Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhy20120210:failed_1
nautilus
nautilus-full-path-properties-page.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nautilus-full-path-properties-page.patch of Package nautilus
diff --git a/src/file-manager/fm-ditem-page.c b/src/file-manager/fm-ditem-page.c index b8d8071..a33de2c 100644 --- a/src/file-manager/fm-ditem-page.c +++ b/src/file-manager/fm-ditem-page.c @@ -301,14 +301,28 @@ build_table (GtkWidget *container, GtkSizeGroup *label_size_group, GList *entries) { + gboolean is_application; GtkWidget *table; GtkWidget *label; + GtkWidget *label_full; + GtkWidget *label_full_path; GtkWidget *entry; GList *l; char *val; + const gchar *exec; + gchar *app_type; int i; - table = gtk_table_new (g_list_length (entries) + 1, 2, FALSE); + app_type = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TYPE, NULL); + is_application = g_strcmp0 (app_type, G_KEY_FILE_DESKTOP_TYPE_APPLICATION) == 0; + g_free (app_type); + + if (is_application) { + table = gtk_table_new (g_list_length (entries) + 2, 2, FALSE); + } else { + table = gtk_table_new (g_list_length (entries) + 1, 2, FALSE); + } + gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); i = 0; @@ -381,6 +395,38 @@ build_table (GtkWidget *container, i++; } + if (is_application && + (exec = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_EXEC, NULL)) != NULL) { + gchar *path, *program, *basename; + gchar **programs; + + programs = g_strsplit (exec, " ", -1); + program = programs [0]; + basename = g_path_get_basename (program); + + path = g_find_program_in_path (basename); + if (path) { + label_full = gtk_label_new (_("Full Path:")); + gtk_misc_set_alignment (GTK_MISC (label_full), 0, 0.5); + + gtk_table_attach (GTK_TABLE (table), label_full, + 0, 1, i, i+1, GTK_FILL, GTK_FILL, + 0, 0); + + label_full_path = gtk_label_new (path); + gtk_misc_set_alignment (GTK_MISC (label_full_path), 0, 0.5); + gtk_label_set_selectable (label_full_path, TRUE); + gtk_table_attach (GTK_TABLE (table), label_full_path, + 1, 2, i, i+1, GTK_FILL, GTK_FILL, + 0, 0); + i++; + g_free (path); + } + g_strfreev (programs); + g_free (exec); + } + + /* append dummy row */ label = gtk_label_new (""); gtk_table_attach (GTK_TABLE (table), label,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor