[libgda/gtk3] Misc small corrections



commit 92c6f9fc3a91a9bed978b60bce3c1b4161a74208
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Jan 12 16:05:56 2011 +0100

    Misc small corrections

 libgda-ui/gdaui-rt-editor.c                     |   24 +++++++++++++---------
 tools/browser/data-manager/data-console.c       |    4 +-
 tools/browser/data-manager/data-source-editor.c |    5 ++-
 tools/browser/data-manager/ui-spec-editor.c     |    4 +-
 4 files changed, 21 insertions(+), 16 deletions(-)
---
diff --git a/libgda-ui/gdaui-rt-editor.c b/libgda-ui/gdaui-rt-editor.c
index 8b2f809..05c125d 100644
--- a/libgda-ui/gdaui-rt-editor.c
+++ b/libgda-ui/gdaui-rt-editor.c
@@ -616,13 +616,13 @@ underline_cb (GtkToggleAction *action, GdauiRtEditor *rte)
 }
 
 static void
-reset_all_cb (GtkAction *action, GdauiRtEditor *rte)
+reset_all_cb (G_GNUC_UNUSED GtkAction *action, GdauiRtEditor *rte)
 {
 	apply_tag (rte, FALSE, NULL);
 }
 
 static void
-add_image_cb (GtkAction *action, GdauiRtEditor *rte)
+add_image_cb (G_GNUC_UNUSED GtkAction *action, GdauiRtEditor *rte)
 {
 	GtkWidget *dlg;
         GtkFileFilter *filter;
@@ -708,7 +708,7 @@ mark_set_cb (GtkTextBuffer *textbuffer, GtkTextIter *location, GtkTextMark *mark
 }
 
 static void
-insert_text_cb (GtkTextBuffer *textbuffer, GtkTextIter *location, gchar *text, gint len, GdauiRtEditor *rte)
+insert_text_cb (GtkTextBuffer *textbuffer, GtkTextIter *location, G_GNUC_UNUSED gchar *text, G_GNUC_UNUSED gint len, GdauiRtEditor *rte)
 {
 	/* if inserting is before a bullet, then insert right after */
 	GtkTextTag *tag;
@@ -721,7 +721,7 @@ insert_text_cb (GtkTextBuffer *textbuffer, GtkTextIter *location, gchar *text, g
 }
 
 static void
-insert_text_after_cb (GtkTextBuffer *textbuffer, GtkTextIter *location, gchar *text, gint len, GdauiRtEditor *rte)
+insert_text_after_cb (GtkTextBuffer *textbuffer, GtkTextIter *location, gchar *text, G_GNUC_UNUSED gint len, GdauiRtEditor *rte)
 {
 	GtkTextIter start, end;
 
@@ -788,7 +788,8 @@ show_markup_item_activate_cb (GtkCheckMenuItem *checkmenuitem, GdauiRtEditor *rt
 }
 
 static void
-bigger_font_item_activate_cb (GtkCheckMenuItem *checkmenuitem, GdauiRtEditor *rte)
+bigger_font_item_activate_cb (G_GNUC_UNUSED GtkCheckMenuItem *checkmenuitem,
+			      GdauiRtEditor *rte)
 {
 	PangoContext *pcontext;
 	PangoFontDescription *fd, *nfd;
@@ -801,7 +802,8 @@ bigger_font_item_activate_cb (GtkCheckMenuItem *checkmenuitem, GdauiRtEditor *rt
 }
 
 static void
-smaller_font_item_activate_cb (GtkCheckMenuItem *checkmenuitem, GdauiRtEditor *rte)
+smaller_font_item_activate_cb (G_GNUC_UNUSED GtkCheckMenuItem *checkmenuitem,
+			       GdauiRtEditor *rte)
 {
 	PangoContext *pcontext;
 	PangoFontDescription *fd, *nfd;
@@ -814,13 +816,14 @@ smaller_font_item_activate_cb (GtkCheckMenuItem *checkmenuitem, GdauiRtEditor *r
 }
 
 static void
-reset_font_item_activate_cb (GtkCheckMenuItem *checkmenuitem, GdauiRtEditor *rte)
+reset_font_item_activate_cb (G_GNUC_UNUSED GtkCheckMenuItem *checkmenuitem,
+			     GdauiRtEditor *rte)
 {
 	gtk_widget_modify_font (GTK_WIDGET (rte->priv->textview), NULL);
 }
 
 static void
-populate_popup_cb (GtkTextView *entry, GtkMenu *menu, GdauiRtEditor *rte)
+populate_popup_cb (G_GNUC_UNUSED GtkTextView *entry, GtkMenu *menu, GdauiRtEditor *rte)
 {
 	GtkWidget *item;
 
@@ -1611,7 +1614,8 @@ remove_newlines_from_base64 (gchar *base64)
 }
 
 static void
-serialize_text (GtkTextBuffer *buffer, SerializationContext *context, GdauiRtEditor *editor)
+serialize_text (G_GNUC_UNUSED GtkTextBuffer *buffer, SerializationContext *context,
+		GdauiRtEditor *editor)
 {
 	GtkTextIter iter, old_iter;
 	GList *opened_tags = NULL; /* 1st element of the list is the last opened tag (ie. the one
@@ -1785,7 +1789,7 @@ serialize_text (GtkTextBuffer *buffer, SerializationContext *context, GdauiRtEdi
  * serialize_as_txt2tag:
  */
 static guint8 *
-serialize_as_txt2tag (GtkTextBuffer     *register_buffer,
+serialize_as_txt2tag (G_GNUC_UNUSED  GtkTextBuffer *register_buffer,
 		      GtkTextBuffer     *content_buffer,
 		      const GtkTextIter *start,
 		      const GtkTextIter *end,
diff --git a/tools/browser/data-manager/data-console.c b/tools/browser/data-manager/data-console.c
index 826a914..20cdcc5 100644
--- a/tools/browser/data-manager/data-console.c
+++ b/tools/browser/data-manager/data-console.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 - 2010 The GNOME Foundation
+ * Copyright (C) 2009 - 2011 The GNOME Foundation
  *
  * AUTHORS:
  *      Vivien Malerba <malerba gnome-db org>
@@ -766,7 +766,7 @@ add_source_clicked_cb (G_GNUC_UNUSED GtkButton *button, DataConsole *dconsole)
 
 	GtkWidget *menu, *mitem, *submenu = NULL;
 	menu = gtk_menu_new ();
-	mitem = gtk_menu_item_new_with_label (_("Data source from query"));
+	mitem = gtk_menu_item_new_with_label (_("Data source from SQL"));
 	g_signal_connect (mitem, "activate",
 			  G_CALLBACK (add_source_mitem_activated_cb), dconsole);
 	gtk_widget_show (mitem);
diff --git a/tools/browser/data-manager/data-source-editor.c b/tools/browser/data-manager/data-source-editor.c
index 85b8136..17334c1 100644
--- a/tools/browser/data-manager/data-source-editor.c
+++ b/tools/browser/data-manager/data-source-editor.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Vivien Malerba
+ * Copyright (C) 2010 - 2011 Vivien Malerba
  *
  * This Library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public License as
@@ -143,9 +143,10 @@ data_source_editor_init (DataSourceEditor *editor)
         gda_holder_set_attribute_static (holder, GDAUI_ATTRIBUTE_PLUGIN, value);
         gda_value_free (value);
 
+#define SPACING 3
 	GtkWidget *hbox, *label, *sw, *text;
 	GtkSizeGroup *sg;
-	hbox = gtk_hbox_new (FALSE, 0);
+	hbox = gtk_hbox_new (FALSE, SPACING);
 	gtk_paned_add2 (GTK_PANED (vpaned), hbox);
 
 	label = gtk_label_new (_("Dependencies:"));
diff --git a/tools/browser/data-manager/ui-spec-editor.c b/tools/browser/data-manager/ui-spec-editor.c
index 7d0602a..cf991ac 100644
--- a/tools/browser/data-manager/ui-spec-editor.c
+++ b/tools/browser/data-manager/ui-spec-editor.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 The GNOME Foundation.
+ * Copyright (C) 2010 - 2011 The GNOME Foundation.
  *
  * AUTHORS:
  *      Vivien Malerba <malerba gnome-db org>
@@ -83,7 +83,7 @@ cell_text_data_func (G_GNUC_UNUSED GtkTreeViewColumn *tree_column, GtkCellRender
 	else
 		g_string_append_c (mark, '-');
 	str = data_source_get_title (source);
-        if (str) {
+        if (str && *str) {
 		if (!id || strcmp ((gchar*) id, (gchar*) str)) {
 			gchar *tmp;
 			tmp = g_markup_escape_text ((gchar*) str, -1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]