Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 313646 Details for
Bug 273701
Review Request: gnome-main-menu - Gnome Main Menu
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for xdg-user-dirs
slab-xdg-user-dir-compat.patch (text/plain), 4.75 KB, created by
Andrea Santilli
on 2008-08-06 21:42:14 UTC
(
hide
)
Description:
patch for xdg-user-dirs
Filename:
MIME Type:
Creator:
Andrea Santilli
Created:
2008-08-06 21:42:14 UTC
Size:
4.75 KB
patch
obsolete
>diff -Naurp gnome-main-menu-0.9.11.bak/libslab/bookmark-agent.c gnome-main-menu-0.9.11/libslab/bookmark-agent.c >--- gnome-main-menu-0.9.11.bak/libslab/bookmark-agent.c 2008-05-31 10:11:44.000000000 +0200 >+++ gnome-main-menu-0.9.11/libslab/bookmark-agent.c 2008-08-06 23:19:26.000000000 +0200 >@@ -20,6 +20,8 @@ > > #include "bookmark-agent.h" > >+#include <glib.h> >+ > #ifdef HAVE_CONFIG_H > # include <config.h> > #else >@@ -1075,15 +1077,20 @@ create_doc_item (BookmarkAgent *this, co > > gchar *uri_new = NULL; > gchar *path; >- gchar *dir; >+ gchar *dir = NULL; > gchar *file; > gchar *template = NULL; > gsize length; > gchar *contents; > >+ gboolean wasSpecialDirFound=TRUE; > > if (! (strcmp (uri, "BLANK_SPREADSHEET") && strcmp (uri, "BLANK_DOCUMENT"))) { >- dir = g_build_filename (g_get_home_dir (), "Documents", NULL); >+ dir = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); >+ if (G_UNLIKELY (dir==NULL)) { >+ wasSpecialDirFound=FALSE; >+ dir = g_build_filename (g_get_home_dir (), "Documents", NULL); >+ } > > if (! strcmp (uri, "BLANK_SPREADSHEET")) { > g_bookmark_file_set_title (priv->store, uri, "BLANK_SPREADSHEET"); >@@ -1113,7 +1120,9 @@ create_doc_item (BookmarkAgent *this, co > > uri_new = g_filename_to_uri (path, NULL, NULL); > >- g_free (dir); >+ if (G_UNLIKELY (wasSpecialDirFound==FALSE)) >+ g_free (dir); >+ > g_free (file); > g_free (path); > g_free (template); >@@ -1132,7 +1141,7 @@ create_dir_item (BookmarkAgent *this, co > BookmarkAgentPrivate *priv = PRIVATE (this); > > gchar *uri_new = NULL; >- gchar *path; >+ gchar *path = NULL; > gchar *name = NULL; > gchar *icon = NULL; > >@@ -1141,6 +1150,7 @@ create_dir_item (BookmarkAgent *this, co > gchar *tag_close_ptr = NULL; > gchar *search_string = NULL; > >+ gboolean wasUserSpecialDirFound=TRUE; > > if (! strcmp (uri, "HOME")) { > uri_new = g_filename_to_uri (g_get_home_dir (), NULL, NULL); >@@ -1148,17 +1158,27 @@ create_dir_item (BookmarkAgent *this, co > icon = "gnome-fs-home"; > } > else if (! strcmp (uri, "DOCUMENTS")) { >- path = g_build_filename (g_get_home_dir (), "Documents", NULL); >+ path = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); >+ if (G_UNLIKELY (path==NULL)) { >+ wasUserSpecialDirFound=FALSE; >+ path = g_build_filename (g_get_home_dir (), "Documents", NULL); >+ } > name = _("Documents"); > uri_new = g_filename_to_uri (path, NULL, NULL); >- g_free (path); >+ if (G_UNLIKELY (wasUserSpecialDirFound==FALSE)) >+ g_free (path); > } > else if (! strcmp (uri, "DESKTOP")) { >- path = g_build_filename (g_get_home_dir (), "Desktop", NULL); >+ path = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP); >+ if (G_UNLIKELY (path==NULL)) { >+ wasUserSpecialDirFound=FALSE; >+ path = g_build_filename (g_get_home_dir (), "Desktop", NULL); >+ } > name = _("Desktop"); > uri_new = g_filename_to_uri (path, NULL, NULL); > icon = "gnome-fs-desktop"; >- g_free (path); >+ if (G_UNLIKELY (wasUserSpecialDirFound==FALSE)) >+ g_free (path); > } > else if (! strcmp (uri, "file:///")) { > icon = "drive-harddisk"; >diff -Naurp gnome-main-menu-0.9.11.bak/main-menu/src/main-menu-ui.c gnome-main-menu-0.9.11/main-menu/src/main-menu-ui.c >--- gnome-main-menu-0.9.11.bak/main-menu/src/main-menu-ui.c 2008-06-14 11:59:54.000000000 +0200 >+++ gnome-main-menu-0.9.11/main-menu/src/main-menu-ui.c 2008-08-06 23:21:13.000000000 +0200 >@@ -24,6 +24,8 @@ > # include <config.h> > #endif > >+#include <glib.h> >+ > #include <panel-applet.h> > #include <glade/glade.h> > #include <cairo.h> >@@ -2315,9 +2317,10 @@ more_buttons_clicked_cb (GtkButton *butt > > gchar *cmd_template; > gchar *cmd; >- gchar *dir; >+ gchar *dir = NULL; > gchar *uri; > >+ gboolean wasUserSpecialDirFound; > > detector = DOUBLE_CLICK_DETECTOR ( > g_object_get_data (G_OBJECT (button), "double-click-detector")); >@@ -2330,10 +2333,15 @@ more_buttons_clicked_cb (GtkButton *butt > if (GTK_WIDGET (button) == priv->more_buttons [APPS_PAGE]) > ditem_id = libslab_get_gconf_value (APP_BROWSER_GCONF_KEY); > else if (GTK_WIDGET (button) == priv->more_buttons [DOCS_PAGE]) { >- dir = g_build_filename (g_get_home_dir (), "Documents", NULL); >+ wasUserSpecialDirFound=TRUE; >+ dir = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); > >- if (! g_file_test (dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) >- dir = g_strdup (g_get_home_dir ()); >+ if (G_UNLIKELY (dir==NULL)) { >+ wasUserSpecialDirFound=FALSE; >+ dir = g_build_filename (g_get_home_dir (), "Documents", NULL); >+ if (! g_file_test (dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) >+ dir = g_strdup (g_get_home_dir ()); >+ } > > uri = g_filename_to_uri (dir, NULL, NULL); > >@@ -2345,7 +2353,9 @@ more_buttons_clicked_cb (GtkButton *butt > g_free (cmd); > g_free (cmd_template); > g_free (uri); >- g_free (dir); >+ >+ if (G_UNLIKELY (wasUserSpecialDirFound == FALSE)) >+ g_free (dir); > > ditem_id = NULL; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 273701
: 313646 |
348312
|
348889
|
348890
|
349100
|
349101