brasero r1088 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1088 - in trunk: . src
- Date: Thu, 14 Aug 2008 12:34:22 +0000 (UTC)
Author: philippr
Date: Thu Aug 14 12:34:22 2008
New Revision: 1088
URL: http://svn.gnome.org/viewvc/brasero?rev=1088&view=rev
Log:
Fix part of #546968 â Some buttons of the gui is not working
Make all recent menu/main window buttons work
* src/brasero-project-manager.c
(brasero_project_manager_open_project),
(brasero_project_manager_open_by_mime),
(brasero_project_manager_open_uri):
* src/brasero-project.c (brasero_project_open_project):
* src/main.c (brasero_app_recent_open):
Modified:
trunk/ChangeLog
trunk/src/brasero-project-manager.c
trunk/src/brasero-project.c
trunk/src/main.c
Modified: trunk/src/brasero-project-manager.c
==============================================================================
--- trunk/src/brasero-project-manager.c (original)
+++ trunk/src/brasero-project-manager.c Thu Aug 14 12:34:22 2008
@@ -723,12 +723,11 @@
BraseroProjectType type;
GtkAction *action;
- gtk_widget_show (manager->priv->layout);
+ gtk_widget_show (manager->priv->layout);
gtk_notebook_set_current_page (GTK_NOTEBOOK (manager), 1);
type = brasero_project_open_project (BRASERO_PROJECT (manager->priv->project), uri);
manager->priv->type = type;
-
if (type == BRASERO_PROJECT_TYPE_INVALID) {
brasero_project_manager_switch (manager, BRASERO_PROJECT_TYPE_INVALID, NULL, NULL, TRUE);
return BRASERO_PROJECT_TYPE_INVALID;
@@ -778,7 +777,10 @@
const gchar *uri,
const gchar *mime)
{
- if (!strcmp (mime, "application/x-brasero"))
+ /* When our files/description of x-brasero mime type is not properly
+ * installed, it's returned as application/xml, so check that too. */
+ if (!strcmp (mime, "application/x-brasero")
+ || !strcmp (mime, "application/xml"))
return brasero_project_manager_open_project (manager, uri);
#ifdef BUILD_PLAYLIST
@@ -805,12 +807,11 @@
brasero_project_manager_open_uri (BraseroProjectManager *manager,
const gchar *uri_arg)
{
- GtkWidget *dialog;
- GtkWidget *window;
gchar *uri;
GFile *file;
GFileInfo *info;
- const gchar *mime;
+ GtkWidget *dialog;
+ GtkWidget *window;
BraseroProjectType type;
/* FIXME: make that asynchronous */
@@ -822,9 +823,10 @@
NULL);
uri = g_file_get_uri (file);
- mime = g_file_info_get_content_type (info);
-
if (g_file_query_exists (file, NULL)) {
+ const gchar *mime;
+
+ mime = g_file_info_get_content_type (info);
type = brasero_project_manager_open_by_mime (manager, uri, mime);
}
else {
Modified: trunk/src/brasero-project.c
==============================================================================
--- trunk/src/brasero-project.c (original)
+++ trunk/src/brasero-project.c Thu Aug 14 12:34:22 2008
@@ -2138,7 +2138,6 @@
BraseroDiscTrack *track = NULL;
BraseroProjectType type;
-
if (!uri || *uri =='\0')
return BRASERO_PROJECT_TYPE_INVALID;
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Thu Aug 14 12:34:22 2008
@@ -396,20 +396,21 @@
manager = gtk_recent_manager_get_default ();
item = gtk_recent_manager_lookup_item (manager, uri, NULL);
- g_free (uri);
-
- if (!item)
+ if (!item) {
+ g_free (uri);
return;
+ }
mime = gtk_recent_info_get_mime_type (item);
-
if (!mime) {
+ g_free (uri);
g_warning ("Unrecognized mime type");
return;
}
brasero_project_manager_open_by_mime (BRASERO_PROJECT_MANAGER (app->contents), uri, mime);
gtk_recent_info_unref (item);
+ g_free (uri);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]