brasero r758 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r758 - in trunk: . src
- Date: Tue, 22 Apr 2008 19:36:03 +0100 (BST)
Author: philippr
Date: Tue Apr 22 18:36:03 2008
New Revision: 758
URL: http://svn.gnome.org/viewvc/brasero?rev=758&view=rev
Log:
Fix for #509013 â Context menu actions for multiple files
Added debug for error in Player
* src/brasero-audio-disc.c (brasero_audio_disc_button_pressed_cb):
* src/brasero-data-disc.c (brasero_data_disc_button_pressed_cb):
* src/brasero-player-bacon.c (brasero_player_bacon_bus_messages):
Modified:
trunk/ChangeLog
trunk/src/brasero-audio-disc.c
trunk/src/brasero-data-disc.c
trunk/src/brasero-player-bacon.c
Modified: trunk/src/brasero-audio-disc.c
==============================================================================
--- trunk/src/brasero-audio-disc.c (original)
+++ trunk/src/brasero-audio-disc.c Tue Apr 22 18:36:03 2008
@@ -3092,17 +3092,27 @@
{
GtkWidgetClass *widget_class;
- /* we call the default handler for the treeview before everything else
- * so it can update itself (paticularly its selection) before we have
- * a look at it */
widget_class = GTK_WIDGET_GET_CLASS (tree);
- widget_class->button_press_event (GTK_WIDGET (tree), event);
if (event->button == 3) {
GtkTreeSelection *selection;
+ GtkTreePath *path = NULL;
GtkWidget *widget;
+ gtk_tree_view_get_path_at_pos (tree,
+ event->x,
+ event->y,
+ &path,
+ NULL,
+ NULL,
+ NULL);
+
selection = gtk_tree_view_get_selection (tree);
+ if (!path || !gtk_tree_selection_path_is_selected (selection, path)) {
+ /* Don't update the selection if the right click was on one of
+ * the already selected rows */
+ widget_class->button_press_event (GTK_WIDGET (tree), event);
+ }
widget = gtk_ui_manager_get_widget (disc->priv->manager, "/ContextMenu/PasteAudio");
if (widget) {
@@ -3126,6 +3136,11 @@
gboolean result;
GtkTreePath *treepath = NULL;
+ /* we call the default handler for the treeview before everything else
+ * so it can update itself (paticularly its selection) before we have
+ * a look at it */
+ widget_class->button_press_event (GTK_WIDGET (tree), event);
+
result = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (disc->priv->tree),
event->x,
event->y,
Modified: trunk/src/brasero-data-disc.c
==============================================================================
--- trunk/src/brasero-data-disc.c (original)
+++ trunk/src/brasero-data-disc.c Tue Apr 22 18:36:03 2008
@@ -1796,6 +1796,7 @@
BraseroDataDisc *self)
{
gboolean result;
+ gboolean is_selected = FALSE;
BraseroFileNode *node = NULL;
GtkTreePath *treepath = NULL;
GtkWidgetClass *widget_class;
@@ -1813,7 +1814,14 @@
NULL);
if (treepath)
- node = brasero_data_tree_model_path_to_node (BRASERO_DATA_TREE_MODEL (priv->project), treepath);
+ node = brasero_data_tree_model_path_to_node (BRASERO_DATA_TREE_MODEL (priv->project),
+ treepath);
+
+ if (node) {
+ GtkTreeSelection *selection;
+ selection = gtk_tree_view_get_selection (tree);
+ is_selected = gtk_tree_selection_path_is_selected (selection, treepath);
+ }
if (!node && treepath) {
/* That may be a BOGUS row */
@@ -1829,9 +1837,9 @@
* NOTE: since the event has been processed here we need to return TRUE
* to avoid having the treeview processing this event a second time. */
widget_class = GTK_WIDGET_GET_CLASS (tree);
- widget_class->button_press_event (GTK_WIDGET (tree), event);
if (priv->loading) {
+ widget_class->button_press_event (GTK_WIDGET (tree), event);
gtk_tree_path_free (treepath);
return TRUE;
}
@@ -1848,6 +1856,8 @@
}
if (event->button == 1) {
+ widget_class->button_press_event (GTK_WIDGET (tree), event);
+
priv->press_start_x = event->x;
priv->press_start_y = event->y;
@@ -1872,6 +1882,11 @@
else if (event->button == 3) {
GtkTreeSelection *selection;
+ /* Don't update the selection if the right click was on one of
+ * the already selected rows */
+ if (!is_selected)
+ widget_class->button_press_event (GTK_WIDGET (tree), event);
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree));
brasero_data_disc_show_menu (gtk_tree_selection_count_selected_rows (selection),
priv->manager,
Modified: trunk/src/brasero-player-bacon.c
==============================================================================
--- trunk/src/brasero-player-bacon.c (original)
+++ trunk/src/brasero-player-bacon.c Tue Apr 22 18:36:03 2008
@@ -543,6 +543,7 @@
{
BraseroPlayerBaconState value;
GstStateChangeReturn result;
+ GError *error = NULL;
GstState state;
switch (GST_MESSAGE_TYPE (msg)) {
@@ -553,6 +554,9 @@
break;
case GST_MESSAGE_ERROR:
+ gst_message_parse_error (msg, &error, NULL);
+ BRASERO_BURN_LOG ("%s", error->message);
+
g_signal_emit (bacon,
brasero_player_bacon_signals [STATE_CHANGED_SIGNAL],
0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]