[nautilus-actions] FmaExportAssistant: re-enable
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] FmaExportAssistant: re-enable
- Date: Wed, 15 Feb 2017 23:00:58 +0000 (UTC)
commit 1241666252df972de99338a66eb01cf9e586cd19
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Feb 14 15:50:49 2017 +0100
FmaExportAssistant: re-enable
TODO | 11 +++++++
src/ui/base-window.c | 2 +-
src/ui/fma-assistant-export.c | 14 ++++-----
src/ui/fma-assistant-export.ui | 66 ++++++++++------------------------------
src/ui/fma-tree-view.c | 28 +++++++++++-----
src/ui/fma-tree-view.h | 4 +-
6 files changed, 55 insertions(+), 70 deletions(-)
---
diff --git a/TODO b/TODO
index 279aa9a..edaf8d4 100644
--- a/TODO
+++ b/TODO
@@ -234,6 +234,17 @@ xxxx 2015- 9-21 instead of:
whether GConf is enabled... auto
whether GConf is available... no|yes
+xxxx 2017- 2-14 Error loading icon from file
'/home/pierre/data/eclipse/nautilus-actions/_install/share/icons/hicolor/48x48/apps/filemanager-actions.png'
+ + icon should be named fma-config-tool (same than the program)
+
+xxxx 2017- 2-14 FMA-Message: base_gtk_utils_widget_set_color: to be written
+
+xxxx 2017- 2-14 implement maintainer menu
+
+xxxx 2017- 2-14 implement help menu
+
+xxxx 2017- 2-14 desktop file should be named fma-config-tool (same than the program)
+
-----------------------------------------------------------------------
DONE
====
diff --git a/src/ui/base-window.c b/src/ui/base-window.c
index a3f769f..26bd794 100644
--- a/src/ui/base-window.c
+++ b/src/ui/base-window.c
@@ -1205,7 +1205,7 @@ display_dlg( const BaseWindow *parent, GtkMessageType type_message, GtkButtonsTy
}
/**
- * Records a connected signal, to be disconnected at NactWindow dispose.
+ * Records a connected signal, to be disconnected at BaseWindow dispose.
*/
gulong
base_window_signal_connect( BaseWindow *window, GObject *instance, const gchar *signal, GCallback fn )
diff --git a/src/ui/fma-assistant-export.c b/src/ui/fma-assistant-export.c
index 72debe0..b8cda5a 100644
--- a/src/ui/fma-assistant-export.c
+++ b/src/ui/fma-assistant-export.c
@@ -110,7 +110,7 @@ static void folder_chooser_initialize_gtk( FMAAssistantExport *window );
static void format_tree_view_initialize_gtk( FMAAssistantExport *window );
static void on_base_initialize_base_window( FMAAssistantExport *window, void *empty );
static void on_base_all_widgets_showed( FMAAssistantExport *window, void *empty );
-static void on_items_tree_view_selection_changed( FMAAssistantExport *window, GList *selected_items,
gpointer user_data );
+static void on_items_tree_view_selection_changed( FMATreeView *tview, GList *selected_items,
FMAAssistantExport *window );
static void on_folder_chooser_selection_changed( GtkFileChooser *chooser, FMAAssistantExport *window
);
static void assistant_prepare( BaseAssistant *window, GtkAssistant *assistant, GtkWidget *page );
static void assist_prepare_confirm( FMAAssistantExport *window, GtkAssistant *assistant, GtkWidget
*page );
@@ -302,8 +302,6 @@ instance_dispose( GObject *window )
self->private->dispose_has_run = TRUE;
- g_object_unref( self->private->items_view );
-
if( self->private->selected_items ){
self->private->selected_items = fma_object_free_items( self->private->selected_items
);
}
@@ -541,7 +539,7 @@ on_base_all_widgets_showed( FMAAssistantExport *window, void *empty )
*/
base_window_signal_connect(
BASE_WINDOW( window ),
- G_OBJECT( window ),
+ G_OBJECT( window->private->items_view ),
TREE_SIGNAL_SELECTION_CHANGED,
G_CALLBACK( on_items_tree_view_selection_changed ));
@@ -563,7 +561,7 @@ on_base_all_widgets_showed( FMAAssistantExport *window, void *empty )
}
static void
-on_items_tree_view_selection_changed( FMAAssistantExport *window, GList *selected_items, gpointer user_data )
+on_items_tree_view_selection_changed( FMATreeView *tview, GList *selected_items, FMAAssistantExport *window )
{
static const gchar *thisfn = "fma_assistant_export_on_items_tree_view_selection_changed";
GtkAssistant *assistant;
@@ -574,9 +572,9 @@ on_items_tree_view_selection_changed( FMAAssistantExport *window, GList *selecte
if( !window->private->dispose_has_run ){
- g_debug( "%s: window=%p, selected_items=%p (count=%d), user_data=%p",
- thisfn, ( void * ) window,
- ( void * ) selected_items, g_list_length( selected_items ), ( void * ) user_data );
+ g_debug( "%s: tview=%p, selected_items=%p (count=%d), window=%p",
+ thisfn, ( void * ) tview,
+ ( void * ) selected_items, g_list_length( selected_items ), ( void * ) window );
if( window->private->selected_items ){
window->private->selected_items = fma_object_free_items(
window->private->selected_items );
diff --git a/src/ui/fma-assistant-export.ui b/src/ui/fma-assistant-export.ui
index 279f852..1a52a2d 100644
--- a/src/ui/fma-assistant-export.ui
+++ b/src/ui/fma-assistant-export.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.4"/>
<object class="GtkAssistant" id="ExportAssistant">
@@ -34,41 +34,27 @@
<object class="GtkLabel" id="ActionsListLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Actions _list :</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="p1-l5-scrolledwindow1">
+ <object class="GtkBox" id="ActionsList">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkTreeView" id="ActionsList">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection"/>
- </child>
- </object>
+ <placeholder/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -129,9 +115,9 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<object class="GtkLabel" id="p3-l4-label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Which format should I use when exporting these
items ?</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -139,8 +125,6 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -166,8 +150,6 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -203,8 +185,8 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<object class="GtkLabel" id="p4-l7-label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">About to export selected
items:</property>
+ <property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -212,30 +194,24 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="p4-ConfirmItemsList">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="xpad">15</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -246,9 +222,9 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<object class="GtkLabel" id="p4-l6-label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Into the destination folder:</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -256,31 +232,25 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="p4-ConfirmTargetFolder">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="xpad">15</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -291,8 +261,8 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<object class="GtkLabel" id="p4-ConfirmExportFormat">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -300,31 +270,25 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="p4-ConfirmExportTooltip">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="xpad">15</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -361,8 +325,8 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<object class="GtkLabel" id="p5-l6-label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Selected items have been
proceeded:</property>
+ <property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -389,6 +353,8 @@ You may use Ctrl and Shift keys to extend the selection.</property>
<object class="GtkBox" id="assistant-action_area1">
<property name="can_focus">False</property>
</object>
+ <packing>
+ </packing>
</child>
</object>
</interface>
diff --git a/src/ui/fma-tree-view.c b/src/ui/fma-tree-view.c
index 520b908..da59df5 100644
--- a/src/ui/fma-tree-view.c
+++ b/src/ui/fma-tree-view.c
@@ -516,7 +516,9 @@ initialize_gtk( FMATreeView *view )
gtk_tree_view_column_set_sort_column_id( column, TREE_COLUMN_LABEL );
gtk_tree_view_append_column( GTK_TREE_VIEW( tview ), column );
- /* allow multiple selection
+ /* always allow multiple selection
+ * - from main window: dnd to a file manager as a shortcut to export assistant
+ * - export assistant: selection of items
*/
selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( tview ));
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
@@ -578,16 +580,24 @@ fma_tree_view_set_edition_mode( FMATreeView *view, guint mode )
priv->mode = mode;
- if( priv->mode == TREE_MODE_EDITION ){
+ switch( priv->mode ){
- column = gtk_tree_view_get_column( priv->tree_view, TREE_COLUMN_LABEL );
- renderers = gtk_cell_layout_get_cells( GTK_CELL_LAYOUT( column ));
- renderer = GTK_CELL_RENDERER( renderers->data );
- gtk_tree_view_column_set_cell_data_func(
- column, renderer, ( GtkTreeCellDataFunc ) display_label, view, NULL );
+ /* main window */
+ case TREE_MODE_EDITION:
- fma_tree_ieditable_initialize(
- FMA_TREE_IEDITABLE( view ), priv->tree_view, priv->window );
+ column = gtk_tree_view_get_column( priv->tree_view, TREE_COLUMN_LABEL );
+ renderers = gtk_cell_layout_get_cells( GTK_CELL_LAYOUT( column ));
+ renderer = GTK_CELL_RENDERER( renderers->data );
+ gtk_tree_view_column_set_cell_data_func(
+ column, renderer, ( GtkTreeCellDataFunc ) display_label,
view, NULL );
+
+ fma_tree_ieditable_initialize(
+ FMA_TREE_IEDITABLE( view ), priv->tree_view, priv->window );
+ break;
+
+ /* export assistant */
+ case TREE_MODE_SELECTION:
+ break;
}
tmodel = gtk_tree_view_get_model( priv->tree_view );
diff --git a/src/ui/fma-tree-view.h b/src/ui/fma-tree-view.h
index 9fb9d9c..ebf0989 100644
--- a/src/ui/fma-tree-view.h
+++ b/src/ui/fma-tree-view.h
@@ -88,8 +88,8 @@ typedef struct {
#define TREE_SIGNAL_CONTEXT_MENU "tree-signal-open-popup"
typedef enum {
- TREE_MODE_EDITION = 1,
- TREE_MODE_SELECTION,
+ TREE_MODE_EDITION = 1, /* main window */
+ TREE_MODE_SELECTION, /* export assistant */
/*< private >*/
TREE_MODE_N_MODES
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]