[libgda] Removed gdaui_data_proxy_column_show_actions()
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Removed gdaui_data_proxy_column_show_actions()
- Date: Mon, 30 Nov 2015 21:11:29 +0000 (UTC)
commit e767c31f2a08022d3d84326eaf54161a57c29497
Author: Vivien Malerba <malerba gnome-db org>
Date: Sun Nov 29 20:49:44 2015 +0100
Removed gdaui_data_proxy_column_show_actions()
doc/C/libgda-ui-sections.txt | 1 -
doc/C/migration4.xml | 1 +
.../data-entries/plugins/gdaui-entry-filesel.c | 1 +
libgda-ui/demos/data_model_dir.c | 1 -
libgda-ui/gdaui-data-proxy.c | 20 --------
libgda-ui/gdaui-data-proxy.h | 2 -
libgda-ui/gdaui-form.c | 9 ----
libgda-ui/gdaui-grid.c | 9 ----
libgda-ui/gdaui-raw-form.c | 19 --------
libgda-ui/gdaui-raw-grid.c | 47 --------------------
libgda-ui/libgda-ui.symbols | 1 -
testing/gdaui-test-data-entries.c | 2 -
tools/browser/gdaui-data-import.c | 1 -
tools/browser/ui-formgrid.c | 2 -
14 files changed, 2 insertions(+), 114 deletions(-)
---
diff --git a/doc/C/libgda-ui-sections.txt b/doc/C/libgda-ui-sections.txt
index 2a169ee..0e1c7ee 100644
--- a/doc/C/libgda-ui-sections.txt
+++ b/doc/C/libgda-ui-sections.txt
@@ -149,7 +149,6 @@ gdaui_data_proxy_get_actions_group
GdauiAction
gdaui_data_proxy_perform_action
gdaui_data_proxy_column_set_editable
-gdaui_data_proxy_column_show_actions
GdauiDataProxyWriteMode
gdaui_data_proxy_set_write_mode
gdaui_data_proxy_get_write_mode
diff --git a/doc/C/migration4.xml b/doc/C/migration4.xml
index 2357827..d7e8344 100644
--- a/doc/C/migration4.xml
+++ b/doc/C/migration4.xml
@@ -96,6 +96,7 @@
<link linkend="migration-4-cnc-api-changes">GdaConnection's API changes</link>.
<itemizedlist>
<listitem><para>GdaMutex has been removed, being redundant with GRecMutex</para></listitem>
+ <listitem><para>gdaui_data_proxy_column_show_actions() has been removed, as it is no longer
necessary.</para></listitem>
</itemizedlist>
</para>
</sect1>
diff --git a/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
b/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
index c8ce8b9..8728466 100644
--- a/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
+++ b/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
@@ -327,4 +327,5 @@ set_editable (GdauiEntryWrapper *mgwrap, gboolean editable)
gtk_editable_set_editable (GTK_EDITABLE (filesel->priv->entry), editable);
gtk_widget_set_sensitive (filesel->priv->button, editable);
+ gtk_widget_set_visible (filesel->priv->button, editable);
}
diff --git a/libgda-ui/demos/data_model_dir.c b/libgda-ui/demos/data_model_dir.c
index 5074363..529150e 100644
--- a/libgda-ui/demos/data_model_dir.c
+++ b/libgda-ui/demos/data_model_dir.c
@@ -92,7 +92,6 @@ do_data_model_dir (GtkWidget *do_widget)
value = gda_value_new_from_string ("picture", G_TYPE_STRING);
gda_holder_set_attribute_static (param, GDAUI_ATTRIBUTE_PLUGIN, value);
- gdaui_data_proxy_column_show_actions (GDAUI_DATA_PROXY (grid), -1, TRUE);
gda_value_free (value);
}
diff --git a/libgda-ui/gdaui-data-proxy.c b/libgda-ui/gdaui-data-proxy.c
index 74646d5..a84b52d 100644
--- a/libgda-ui/gdaui-data-proxy.c
+++ b/libgda-ui/gdaui-data-proxy.c
@@ -133,26 +133,6 @@ gdaui_data_proxy_column_set_editable (GdauiDataProxy *iface, gint column, gboole
}
/**
- * gdaui_data_proxy_column_show_actions:
- * @iface: an object which implements the #GdauiDataProxy interface
- * @column: column number of the data, or -1 to apply the setting to all the columns
- * @show_actions: set to %TRUE if the actions menu must be shown
- *
- * Sets if the data entry in the @iface widget at @column (in the data model @iface operates on) must show
its
- * actions menu or not.
- *
- * Since: 4.2
- */
-void
-gdaui_data_proxy_column_show_actions (GdauiDataProxy *iface, gint column, gboolean show_actions)
-{
- g_return_if_fail (GDAUI_IS_DATA_PROXY (iface));
-
- if (GDAUI_DATA_PROXY_GET_IFACE (iface)->show_column_actions)
- (GDAUI_DATA_PROXY_GET_IFACE (iface)->show_column_actions) (iface, column, show_actions);
-}
-
-/**
* gdaui_data_proxy_supports_action:
* @iface: an object which implements the #GdauiDataProxy interface
* @action: a #GdauiAction action
diff --git a/libgda-ui/gdaui-data-proxy.h b/libgda-ui/gdaui-data-proxy.h
index 66e7103..1b5e55e 100644
--- a/libgda-ui/gdaui-data-proxy.h
+++ b/libgda-ui/gdaui-data-proxy.h
@@ -59,7 +59,6 @@ struct _GdauiDataProxyIface
/* virtual table */
GdaDataProxy *(* get_proxy) (GdauiDataProxy *iface);
void (* set_column_editable) (GdauiDataProxy *iface, gint column, gboolean editable);
- void (* show_column_actions) (GdauiDataProxy *iface, gint column, gboolean
show_actions);
gboolean (* supports_action) (GdauiDataProxy *iface, GdauiAction action);
void (* perform_action) (GdauiDataProxy *iface, GdauiAction action);
gboolean (* set_write_mode) (GdauiDataProxy *iface, GdauiDataProxyWriteMode mode);
@@ -90,7 +89,6 @@ gboolean gdaui_data_proxy_supports_action (GdauiDataProxy *if
void gdaui_data_proxy_perform_action (GdauiDataProxy *iface, GdauiAction action); /*
FIXME: add an optional row number on which to apply the action, useless for GDAUI_ACTION_MOVE_* actions */
void gdaui_data_proxy_column_set_editable (GdauiDataProxy *iface, gint column, gboolean
editable);
-void gdaui_data_proxy_column_show_actions (GdauiDataProxy *iface, gint column, gboolean
show_actions);
gboolean gdaui_data_proxy_set_write_mode (GdauiDataProxy *iface, GdauiDataProxyWriteMode
mode);
GdauiDataProxyWriteMode gdaui_data_proxy_get_write_mode (GdauiDataProxy *iface);
diff --git a/libgda-ui/gdaui-form.c b/libgda-ui/gdaui-form.c
index 2a613b8..0019e07 100644
--- a/libgda-ui/gdaui-form.c
+++ b/libgda-ui/gdaui-form.c
@@ -46,7 +46,6 @@ static void gdaui_form_get_property (GObject *object,
static void gdaui_form_widget_init (GdauiDataProxyIface *iface);
static GdaDataProxy *gdaui_form_get_proxy (GdauiDataProxy *iface);
static void gdaui_form_set_column_editable (GdauiDataProxy *iface, gint column, gboolean
editable);
-static void gdaui_form_show_column_actions (GdauiDataProxy *iface, gint column, gboolean
show_actions);
static gboolean gdaui_form_supports_action (GdauiDataProxy *iface, GdauiAction action);
static void gdaui_form_perform_action (GdauiDataProxy *iface, GdauiAction action);
static gboolean gdaui_form_widget_set_write_mode (GdauiDataProxy *iface, GdauiDataProxyWriteMode
mode);
@@ -124,7 +123,6 @@ gdaui_form_widget_init (GdauiDataProxyIface *iface)
{
iface->get_proxy = gdaui_form_get_proxy;
iface->set_column_editable = gdaui_form_set_column_editable;
- iface->show_column_actions = gdaui_form_show_column_actions;
iface->supports_action = gdaui_form_supports_action;
iface->perform_action = gdaui_form_perform_action;
iface->set_write_mode = gdaui_form_widget_set_write_mode;
@@ -352,13 +350,6 @@ gdaui_form_set_column_editable (GdauiDataProxy *iface, gint column, gboolean edi
column, editable);
}
-static void
-gdaui_form_show_column_actions (GdauiDataProxy *iface, gint column, gboolean show_actions)
-{
- gdaui_data_proxy_column_show_actions ((GdauiDataProxy*) GDAUI_FORM (iface)->priv->raw_form,
- column, show_actions);
-}
-
static gboolean
gdaui_form_supports_action (GdauiDataProxy *iface, GdauiAction action)
{
diff --git a/libgda-ui/gdaui-grid.c b/libgda-ui/gdaui-grid.c
index 916d4f2..13fdec3 100644
--- a/libgda-ui/gdaui-grid.c
+++ b/libgda-ui/gdaui-grid.c
@@ -46,7 +46,6 @@ static void gdaui_grid_get_property (GObject *object,
static void gdaui_grid_widget_init (GdauiDataProxyIface *iface);
static GdaDataProxy *gdaui_grid_get_proxy (GdauiDataProxy *iface);
static void gdaui_grid_set_column_editable (GdauiDataProxy *iface, gint column, gboolean
editable);
-static void gdaui_grid_show_column_actions (GdauiDataProxy *iface, gint column, gboolean
show_actions);
static gboolean gdaui_grid_supports_action (GdauiDataProxy *iface, GdauiAction action);
static void gdaui_grid_perform_action (GdauiDataProxy *iface, GdauiAction action);
static gboolean gdaui_grid_widget_set_write_mode (GdauiDataProxy *iface, GdauiDataProxyWriteMode
mode);
@@ -125,7 +124,6 @@ gdaui_grid_widget_init (GdauiDataProxyIface *iface)
{
iface->get_proxy = gdaui_grid_get_proxy;
iface->set_column_editable = gdaui_grid_set_column_editable;
- iface->show_column_actions = gdaui_grid_show_column_actions;
iface->supports_action = gdaui_grid_supports_action;
iface->perform_action = gdaui_grid_perform_action;
iface->set_write_mode = gdaui_grid_widget_set_write_mode;
@@ -349,13 +347,6 @@ gdaui_grid_set_column_editable (GdauiDataProxy *iface, gint column, gboolean edi
column, editable);
}
-static void
-gdaui_grid_show_column_actions (GdauiDataProxy *iface, gint column, gboolean show_actions)
-{
- gdaui_data_proxy_column_show_actions ((GdauiDataProxy*) GDAUI_GRID (iface)->priv->raw_grid,
- column, show_actions);
-}
-
static gboolean
gdaui_grid_supports_action (GdauiDataProxy *iface, GdauiAction action)
{
diff --git a/libgda-ui/gdaui-raw-form.c b/libgda-ui/gdaui-raw-form.c
index ad9d171..5c058ad 100644
--- a/libgda-ui/gdaui-raw-form.c
+++ b/libgda-ui/gdaui-raw-form.c
@@ -57,7 +57,6 @@ static void proxy_row_inserted_or_removed_cb (GdaDataProxy *proxy, gint row, Gda
static void gdaui_raw_form_widget_init (GdauiDataProxyIface *iface);
static GdaDataProxy *gdaui_raw_form_get_proxy (GdauiDataProxy *iface);
static void gdaui_raw_form_set_column_editable (GdauiDataProxy *iface, gint column, gboolean
editable);
-static void gdaui_raw_form_show_column_actions (GdauiDataProxy *iface, gint column, gboolean
show_actions);
static gboolean gdaui_raw_form_supports_action (GdauiDataProxy *iface, GdauiAction action);
static void gdaui_raw_form_perform_action (GdauiDataProxy *iface, GdauiAction action);
static gboolean gdaui_raw_form_widget_set_write_mode (GdauiDataProxy *iface, GdauiDataProxyWriteMode
mode);
@@ -138,7 +137,6 @@ gdaui_raw_form_widget_init (GdauiDataProxyIface *iface)
{
iface->get_proxy = gdaui_raw_form_get_proxy;
iface->set_column_editable = gdaui_raw_form_set_column_editable;
- iface->show_column_actions = gdaui_raw_form_show_column_actions;
iface->supports_action = gdaui_raw_form_supports_action;
iface->perform_action = gdaui_raw_form_perform_action;
iface->set_write_mode = gdaui_raw_form_widget_set_write_mode;
@@ -561,10 +559,6 @@ gdaui_raw_form_set_property (GObject *object,
iter_row_changed_cb (form->priv->iter,
gda_data_model_iter_get_row (form->priv->iter), form);
- /* actions */
- if (gda_data_proxy_is_read_only (form->priv->proxy))
- g_object_set ((GObject*) form, "show-actions", FALSE, NULL);
-
/* data display update */
proxy_changed_cb (form->priv->proxy, form);
@@ -775,19 +769,6 @@ gdaui_raw_form_set_column_editable (GdauiDataProxy *iface, G_GNUC_UNUSED gint co
*/
}
-static void
-gdaui_raw_form_show_column_actions (GdauiDataProxy *iface, G_GNUC_UNUSED gint column, gboolean show_actions)
-{
- GdauiRawForm *form;
-
- g_return_if_fail (GDAUI_IS_RAW_FORM (iface));
- form = GDAUI_RAW_FORM (iface);
- g_return_if_fail (form->priv);
-
- /* REM: don't take care of the @column argument */
- g_object_set ((GObject*) form, "show-actions", show_actions, NULL);
-}
-
static gboolean
gdaui_raw_form_widget_set_write_mode (GdauiDataProxy *iface, GdauiDataProxyWriteMode mode)
{
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index 700a7ab..4bd1e96 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -69,7 +69,6 @@ static void reset_columns_in_xml_layout (GdauiRawGrid *grid, xmlNodePtr grid_nod
static void gdaui_raw_grid_widget_init (GdauiDataProxyIface *iface);
static GdaDataProxy *gdaui_raw_grid_get_proxy (GdauiDataProxy *iface);
static void gdaui_raw_grid_set_column_editable (GdauiDataProxy *iface, gint column, gboolean
editable);
-static void gdaui_raw_grid_show_column_actions (GdauiDataProxy *iface, gint column, gboolean
show_actions);
static gboolean gdaui_raw_grid_supports_action (GdauiDataProxy *iface, GdauiAction action);
static void gdaui_raw_grid_perform_action (GdauiDataProxy *iface, GdauiAction action);
static gboolean gdaui_raw_grid_widget_set_write_mode (GdauiDataProxy *iface, GdauiDataProxyWriteMode
mode);
@@ -134,7 +133,6 @@ struct _GdauiRawGridPriv
GSList *reordered_indexes; /* Indexes of the reordered columns. */
gboolean default_show_info_cell;
- gboolean default_show_global_actions;
gint export_type; /* used by the export dialog */
GdauiDataProxyWriteMode write_mode;
@@ -222,7 +220,6 @@ gdaui_raw_grid_widget_init (GdauiDataProxyIface *iface)
{
iface->get_proxy = gdaui_raw_grid_get_proxy;
iface->set_column_editable = gdaui_raw_grid_set_column_editable;
- iface->show_column_actions = gdaui_raw_grid_show_column_actions;
iface->supports_action = gdaui_raw_grid_supports_action;
iface->perform_action = gdaui_raw_grid_perform_action;
iface->set_write_mode = gdaui_raw_grid_widget_set_write_mode;
@@ -352,7 +349,6 @@ gdaui_raw_grid_init (GdauiRawGrid *grid)
grid->priv->iter_row = -1;
grid->priv->proxy = NULL;
grid->priv->default_show_info_cell = FALSE;
- grid->priv->default_show_global_actions = TRUE;
grid->priv->columns_data = NULL;
grid->priv->columns_hash = g_hash_table_new (NULL, NULL);
grid->priv->export_type = 1;
@@ -2443,49 +2439,6 @@ gdaui_raw_grid_set_column_editable (GdauiDataProxy *iface, gint column, gboolean
}
}
-static void
-gdaui_raw_grid_show_column_actions (GdauiDataProxy *iface, gint column, gboolean show_actions)
-{
- GdauiRawGrid *grid;
-
- g_return_if_fail (GDAUI_IS_RAW_GRID (iface));
- grid = GDAUI_RAW_GRID (iface);
- g_return_if_fail (grid->priv);
-
- if (column >= 0) {
- GdaHolder *param;
- GdauiSetGroup *group;
- ColumnData *cdata;
-
- /* setting applies only to the @column column */
- param = gda_data_model_iter_get_holder_for_field (grid->priv->iter, column);
- g_return_if_fail (param);
-
- group = _gdaui_set_get_group (grid->priv->iter_info, param);
- g_return_if_fail (group);
-
- cdata = get_column_data_for_group (grid, group);
- g_return_if_fail (cdata);
-
- if (show_actions != cdata->info_shown) {
- cdata->info_shown = show_actions;
- g_object_set (G_OBJECT (cdata->info_cell), "visible", cdata->info_shown, NULL);
- }
- }
- else {
- /* setting applies to all columns */
- GSList *list;
- for (list = grid->priv->columns_data; list; list = list->next) {
- ColumnData *cdata = (ColumnData*)(list->data);
- if (show_actions != cdata->info_shown) {
- cdata->info_shown = show_actions;
- g_object_set (G_OBJECT (cdata->info_cell), "visible", cdata->info_shown,
NULL);
- }
- }
- grid->priv->default_show_info_cell = show_actions;
- }
-}
-
static gboolean
gdaui_raw_grid_supports_action (GdauiDataProxy *iface, GdauiAction action)
{
diff --git a/libgda-ui/libgda-ui.symbols b/libgda-ui/libgda-ui.symbols
index a05e60e..cb65fdd 100644
--- a/libgda-ui/libgda-ui.symbols
+++ b/libgda-ui/libgda-ui.symbols
@@ -63,7 +63,6 @@
gdaui_data_filter_get_type
gdaui_data_filter_new
gdaui_data_proxy_column_set_editable
- gdaui_data_proxy_column_show_actions
gdaui_data_proxy_get_proxy
gdaui_data_proxy_get_type
gdaui_data_proxy_get_write_mode
diff --git a/testing/gdaui-test-data-entries.c b/testing/gdaui-test-data-entries.c
index b8bd831..0724b20 100644
--- a/testing/gdaui-test-data-entries.c
+++ b/testing/gdaui-test-data-entries.c
@@ -988,7 +988,6 @@ build_form_test_for_gtype (G_GNUC_UNUSED GdaDataHandler *dh, GType type, const g
wid = gdaui_form_new (model);
plist = GDA_SET (gdaui_data_selector_get_data_set (GDAUI_DATA_SELECTOR (wid)));
- gdaui_data_proxy_column_show_actions (GDAUI_DATA_PROXY (wid), -1, TRUE);
param = plist->holders->data;
value = gda_value_new_from_string (plugin_name, G_TYPE_STRING);
@@ -1021,7 +1020,6 @@ build_grid_test_for_gtype (G_GNUC_UNUSED GdaDataHandler *dh, GType type, const g
wid = gdaui_grid_new (model);
plist = GDA_SET (gdaui_data_selector_get_data_set (GDAUI_DATA_SELECTOR (wid)));
- gdaui_data_proxy_column_show_actions (GDAUI_DATA_PROXY (wid), -1, TRUE);
param = plist->holders->data;
value = gda_value_new_from_string (plugin_name, G_TYPE_STRING);
diff --git a/tools/browser/gdaui-data-import.c b/tools/browser/gdaui-data-import.c
index 217794c..ea6e9a7 100644
--- a/tools/browser/gdaui-data-import.c
+++ b/tools/browser/gdaui-data-import.c
@@ -417,7 +417,6 @@ spec_changed_cb (GtkWidget *wid, GdauiDataImport *import)
gtk_widget_hide (import->priv->no_data_label);
import->priv->preview_grid = gdaui_grid_new (import->priv->model);
- gdaui_data_proxy_column_show_actions (GDAUI_DATA_PROXY (import->priv->preview_grid), -1,
FALSE);
gdaui_grid_set_sample_size (GDAUI_GRID (import->priv->preview_grid), 50);
g_object_set (G_OBJECT (import->priv->preview_grid), "info-flags",
GDAUI_DATA_PROXY_INFO_CHUNCK_CHANGE_BUTTONS |
diff --git a/tools/browser/ui-formgrid.c b/tools/browser/ui-formgrid.c
index ded67e5..d2eb90e 100644
--- a/tools/browser/ui-formgrid.c
+++ b/tools/browser/ui-formgrid.c
@@ -324,13 +324,11 @@ ui_formgrid_init (UiFormGrid *formgrid)
/* grid on 1st page of notebook, not added there */
formgrid->priv->raw_grid = gdaui_raw_grid_new (NULL);
- gdaui_data_proxy_column_show_actions (GDAUI_DATA_PROXY (formgrid->priv->raw_grid), -1, FALSE);
g_signal_connect (formgrid->priv->raw_grid, "populate-popup",
G_CALLBACK (form_grid_populate_popup_cb), formgrid);
/* form on the 2nd page of the notebook, not added there */
formgrid->priv->raw_form = gdaui_raw_form_new (NULL);
- gdaui_data_proxy_column_show_actions (GDAUI_DATA_PROXY (formgrid->priv->raw_form), -1, FALSE);
g_signal_connect (formgrid->priv->raw_form, "populate-popup",
G_CALLBACK (form_grid_populate_popup_cb), formgrid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]