[libgda] GdaBrowser: UI improvements
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaBrowser: UI improvements
- Date: Fri, 18 Mar 2011 19:59:05 +0000 (UTC)
commit a78dee46acf39c58bea0add5daa47191cf07d5f8
Author: Vivien Malerba <malerba gnome-db org>
Date: Fri Mar 18 19:00:47 2011 +0100
GdaBrowser: UI improvements
tools/browser/auth-dialog.c | 1 +
tools/browser/browser-connection.c | 2 ++
tools/browser/browser-connections-list.c | 4 ++--
tools/browser/browser-window.c | 3 +++
tools/browser/common/gdaui-data-import.c | 16 ++++++++--------
tools/browser/common/gdaui-entry-import.c | 8 ++++----
.../browser/data-manager/data-favorite-selector.c | 2 +-
tools/browser/main.c | 3 ++-
8 files changed, 23 insertions(+), 16 deletions(-)
---
diff --git a/tools/browser/auth-dialog.c b/tools/browser/auth-dialog.c
index 823c8d2..744aec8 100644
--- a/tools/browser/auth-dialog.c
+++ b/tools/browser/auth-dialog.c
@@ -420,6 +420,7 @@ auth_dialog_add_cnc_string (AuthDialog *dialog, const gchar *cnc_string, GError
AuthData *ad;
ad = g_new0 (AuthData, 1);
ad->wrapper = gda_thread_wrapper_new ();
+ /*g_print ("Login dialog: new thread wrapper %p\n", ad->wrapper);*/
ad->ext.cnc_string = g_strdup (cnc_string);
ad->auth_string = NULL;
info = gda_config_get_dsn_info (real_cnc);
diff --git a/tools/browser/browser-connection.c b/tools/browser/browser-connection.c
index 0c76447..fca2834 100644
--- a/tools/browser/browser-connection.c
+++ b/tools/browser/browser-connection.c
@@ -390,6 +390,8 @@ browser_connection_set_property (GObject *object,
if (!bcnc->priv->cnc)
return;
+ /*g_print ("BrowserConnection %p [%s], wrapper %p, GdaConnection %p\n",
+ bcnc, bcnc->priv->name, bcnc->priv->wrapper, bcnc->priv->cnc);*/
g_object_ref (bcnc->priv->cnc);
bcnc->priv->transaction_status_signal =
gda_thread_wrapper_connect_raw (bcnc->priv->wrapper,
diff --git a/tools/browser/browser-connections-list.c b/tools/browser/browser-connections-list.c
index b4649db..bcc48a7 100644
--- a/tools/browser/browser-connections-list.c
+++ b/tools/browser/browser-connections-list.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Vivien Malerba
+ * Copyright (C) 2009 - 2011 Vivien Malerba
*
* This Program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -373,7 +373,7 @@ browser_connections_list_show (BrowserConnection *current)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
- gtk_table_attach_defaults (GTK_TABLE (table), sw, 0, 1, 2, 4);
+ gtk_table_attach (GTK_TABLE (table), sw, 0, 1, 2, 4, 0, GTK_FILL, 0, 0);
/* connection's properties */
label = gtk_label_new ("");
diff --git a/tools/browser/browser-window.c b/tools/browser/browser-window.c
index 34ff165..bbb8699 100644
--- a/tools/browser/browser-window.c
+++ b/tools/browser/browser-window.c
@@ -667,6 +667,9 @@ perspective_toggle_cb (GtkRadioAction *action, GtkRadioAction *current, BrowserW
static void
connection_busy_cb (BrowserConnection *bcnc, gboolean is_busy, gchar *reason, BrowserWindow *bwin)
{
+ if (bcnc != bwin->priv->bcnc)
+ return;
+
if (is_busy) {
browser_spinner_start (BROWSER_SPINNER (bwin->priv->spinner));
gtk_widget_set_tooltip_text (bwin->priv->spinner, reason);
diff --git a/tools/browser/common/gdaui-data-import.c b/tools/browser/common/gdaui-data-import.c
index 234dcb5..600403c 100644
--- a/tools/browser/common/gdaui-data-import.c
+++ b/tools/browser/common/gdaui-data-import.c
@@ -1,6 +1,5 @@
-/* gdaui-data-import.c
- *
- * Copyright (C) 2006 - 2008 Vivien Malerba
+/*
+ * Copyright (C) 2006 - 2011 Vivien Malerba
*
* This Program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -174,8 +173,9 @@ gdaui_data_import_init (GdauiDataImport * import)
encs_errors = gda_data_model_import_get_errors (GDA_DATA_MODEL_IMPORT (encs));
if (encs_errors) {
for (; encs_errors; encs_errors = g_slist_next (encs_errors)) {
- g_print ("Error: %s\n", encs_errors->data && ((GError *) encs_errors->data)->message ?
- ((GError *) encs_errors->data)->message : _("no detail"));
+ gda_log_message ("Error importing import_encodings.xml: %s\n",
+ encs_errors->data && ((GError *) encs_errors->data)->message ?
+ ((GError *) encs_errors->data)->message : _("no detail"));
}
import->priv->encoding_combo = NULL;
}
@@ -275,11 +275,12 @@ gdaui_data_import_init (GdauiDataImport * import)
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_hbox_new (FALSE, 0); /* HIG */
+ import->priv->preview_box = hbox;
+
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
label = gtk_label_new (" ");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- import->priv->preview_box = hbox;
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), _("No data."));
@@ -289,8 +290,7 @@ gdaui_data_import_init (GdauiDataImport * import)
gtk_widget_show_all (vbox);
- gtk_paned_set_position (GTK_PANED (import), 1);
-
+ gtk_paned_set_position (GTK_PANED (import), 1);
}
/**
diff --git a/tools/browser/common/gdaui-entry-import.c b/tools/browser/common/gdaui-entry-import.c
index 027510d..f38dc63 100644
--- a/tools/browser/common/gdaui-entry-import.c
+++ b/tools/browser/common/gdaui-entry-import.c
@@ -1,6 +1,5 @@
-/* gdaui-entry-import.c
- *
- * Copyright (C) 2009 - 2010 Vivien Malerba
+/*
+ * Copyright (C) 2009 - 2011 Vivien Malerba
*
* This Program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -178,8 +177,9 @@ open_button_clicked_cb (GtkWidget *button, GdauiEntryImport *mgtxt)
GTK_STOCK_CANCEL,
GTK_RESPONSE_REJECT,
NULL);
+ gtk_window_set_default_size (GTK_WINDOW (dialog), 620, 450);
wid = gdaui_data_import_new ();
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), wid);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), wid, TRUE, TRUE, 0);
gtk_widget_show_all (dialog);
res = gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/tools/browser/data-manager/data-favorite-selector.c b/tools/browser/data-manager/data-favorite-selector.c
index a7eb4a9..eaa157e 100644
--- a/tools/browser/data-manager/data-favorite-selector.c
+++ b/tools/browser/data-manager/data-favorite-selector.c
@@ -480,7 +480,7 @@ data_favorite_selector_new (BrowserConnection *bcnc)
/* header */
GtkWidget *label;
gchar *str;
- str = g_strdup_printf ("<b>%s</b>", _("Favorites"));
+ str = g_strdup_printf ("<b>%s</b>", _("Saved"));
label = cc_gray_bar_new (str);
g_free (str);
cc_gray_bar_set_icon_from_pixbuf (CC_GRAY_BAR (label), browser_get_pixbuf_icon (BROWSER_ICON_BOOKMARK));
diff --git a/tools/browser/main.c b/tools/browser/main.c
index b10429d..8ab179e 100644
--- a/tools/browser/main.c
+++ b/tools/browser/main.c
@@ -233,10 +233,11 @@ main (int argc, char *argv[])
}
}
}
+ gtk_widget_destroy (dialog);
}
}
- /*g_print ("Main THREAD is %p\n", g_thread_self ());*/
+ /*g_print ("Main (GTK+) THREAD is %p\n", g_thread_self ());*/
if (have_loop)
/* application loop */
gtk_main ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]