brasero r1065 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1065 - in trunk: . src
- Date: Mon, 11 Aug 2008 17:13:55 +0000 (UTC)
Author: philippr
Date: Mon Aug 11 17:13:55 2008
New Revision: 1065
URL: http://svn.gnome.org/viewvc/brasero?rev=1065&view=rev
Log:
Turn the sidepane selection information display (in statusbar)
on and off according to the sidepane state
* src/brasero-layout.c (brasero_layout_set_side_pane_visible),
(brasero_layout_class_init):
* src/brasero-project-manager.c
(brasero_project_manager_sidepane_changed),
(brasero_project_manager_init):
Modified:
trunk/ChangeLog
trunk/src/brasero-layout.c
trunk/src/brasero-project-manager.c
Modified: trunk/src/brasero-layout.c
==============================================================================
--- trunk/src/brasero-layout.c (original)
+++ trunk/src/brasero-layout.c Mon Aug 11 17:13:55 2008
@@ -174,6 +174,14 @@
#define BRASERO_KEY_LAYOUT_DATA BRASERO_KEY_DISPLAY_DIR "data_pane"
#define BRASERO_KEY_LAYOUT_VIDEO BRASERO_KEY_DISPLAY_DIR "video_pane"
+/* signals */
+typedef enum {
+ SIDEPANE_SIGNAL,
+ LAST_SIGNAL
+} BraseroLayoutSignalType;
+
+static guint brasero_layout_signals [LAST_SIGNAL] = { 0 };
+
static void
brasero_layout_pack_preview (BraseroLayout *layout)
{
@@ -514,12 +522,19 @@
brasero_project_set_source (BRASERO_PROJECT (layout->priv->project),
NULL);
}
- else
+ else {
brasero_project_set_source (BRASERO_PROJECT (layout->priv->project),
BRASERO_URI_CONTAINER (source));
+ brasero_uri_container_uri_selected (BRASERO_URI_CONTAINER (source));
+ }
gtk_widget_show (layout->priv->main_box->parent);
}
+
+ g_signal_emit (layout,
+ brasero_layout_signals [SIDEPANE_SIGNAL],
+ 0,
+ visible);
}
static void
@@ -1250,6 +1265,16 @@
gtk_widget_class->show = brasero_layout_show;
gtk_object_class->destroy = brasero_layout_destroy;
+
+ brasero_layout_signals[SIDEPANE_SIGNAL] =
+ g_signal_new ("sidepane", G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_ACTION | G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_BOOLEAN);
}
static void
Modified: trunk/src/brasero-project-manager.c
==============================================================================
--- trunk/src/brasero-project-manager.c (original)
+++ trunk/src/brasero-project-manager.c Mon Aug 11 17:13:55 2008
@@ -386,6 +386,23 @@
g_slist_free (list);
g_strfreev (uris);
}
+
+void
+brasero_project_manager_sidepane_changed (BraseroLayout *layout,
+ gboolean visible,
+ BraseroProjectManager *manager)
+{
+ if (!visible) {
+ /* If sidepane is disabled, remove any text about selection */
+ if (manager->priv->io)
+ brasero_io_cancel_by_base (manager->priv->io,
+ manager->priv->size_preview);
+
+ gtk_statusbar_pop (GTK_STATUSBAR (manager->priv->status),
+ manager->priv->status_ctx);
+ }
+}
+
void
brasero_project_manager_set_status (BraseroProjectManager *manager,
GtkWidget *status)
@@ -968,6 +985,11 @@
gtk_widget_show (obj->priv->layout);
gtk_notebook_append_page (GTK_NOTEBOOK (obj), obj->priv->layout, NULL);
+ g_signal_connect (obj->priv->layout,
+ "sidepane",
+ G_CALLBACK (brasero_project_manager_sidepane_changed),
+ obj);
+
/* create the project for audio and data discs */
obj->priv->project = brasero_project_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]