[devhelp] search,window: fix compilation warnings
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] search,window: fix compilation warnings
- Date: Tue, 6 Mar 2012 13:26:44 +0000 (UTC)
commit b4b983b077a5dedb76d062483c5a5f9eae2d0e71
Author: Aleksander Morgado <aleksander lanedo com>
Date: Sat Mar 3 15:30:20 2012 +0100
search,window: fix compilation warnings
Avoid setting variables which are not used afterwards.
https://bugzilla.gnome.org/show_bug.cgi?id=671256
src/dh-search.c | 11 ++---------
src/dh-window.c | 16 ----------------
2 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/src/dh-search.c b/src/dh-search.c
index f292f4d..84a19f9 100644
--- a/src/dh-search.c
+++ b/src/dh-search.c
@@ -358,12 +358,11 @@ search_entry_activated_cb (GtkEntry *entry,
gchar *book_id;
gchar *language;
const gchar *str;
- DhLink *link;
/* Always sets book_id and language */
search_combo_get_active (search, &book_id, &language);
str = gtk_entry_get_text (GTK_ENTRY (priv->entry));
- link = dh_keyword_model_filter (priv->model, str, book_id, language);
+ dh_keyword_model_filter (priv->model, str, book_id, language);
g_free (book_id);
g_free (language);
}
@@ -390,12 +389,11 @@ search_complete_idle (DhSearch *search)
DhSearchPriv *priv = GET_PRIVATE (search);
const gchar *str;
gchar *completed = NULL;
- GList *list;
gsize length;
str = gtk_entry_get_text (GTK_ENTRY (priv->entry));
- list = g_completion_complete (priv->completion, str, &completed);
+ g_completion_complete (priv->completion, str, &completed);
if (completed) {
length = strlen (str);
@@ -443,14 +441,9 @@ search_cell_data_func (GtkTreeViewColumn *tree_column,
GtkTreeIter *iter,
gpointer data)
{
- DhSearch *search;
- DhSearchPriv *priv;
DhLink *link;
PangoStyle style;
- search = data;
- priv = GET_PRIVATE (search);
-
gtk_tree_model_get (tree_model, iter,
DH_KEYWORD_MODEL_COL_LINK, &link,
-1);
diff --git a/src/dh-window.c b/src/dh-window.c
index 67fc14b..032da17 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -186,10 +186,6 @@ static void
window_activate_new_tab (GtkAction *action,
DhWindow *window)
{
- DhWindowPriv *priv;
-
- priv = window->priv;
-
window_open_new_tab (window, NULL, TRUE);
}
@@ -355,11 +351,8 @@ static void
window_activate_zoom_in (GtkAction *action,
DhWindow *window)
{
- DhWindowPriv *priv;
int zoom_level_idx;
- priv = window->priv;
-
zoom_level_idx = window_get_current_zoom_level_index (window);
if (zoom_levels[zoom_level_idx].level < ZOOM_MAXIMAL) {
WebKitWebView *web_view;
@@ -375,11 +368,8 @@ static void
window_activate_zoom_out (GtkAction *action,
DhWindow *window)
{
- DhWindowPriv *priv;
int zoom_level_idx;
- priv = window->priv;
-
zoom_level_idx = window_get_current_zoom_level_index (window);
if (zoom_levels[zoom_level_idx].level > ZOOM_MINIMAL) {
WebKitWebView *web_view;
@@ -394,11 +384,8 @@ static void
window_activate_zoom_default (GtkAction *action,
DhWindow *window)
{
- DhWindowPriv *priv;
WebKitWebView *web_view;
- priv = window->priv;
-
web_view = window_get_active_web_view (window);
webkit_web_view_set_zoom_level (web_view, ZOOM_DEFAULT);
window_update_zoom_actions_sensitiveness (window);
@@ -1429,12 +1416,9 @@ window_tree_link_selected_cb (GObject *ignored,
DhLink *link,
DhWindow *window)
{
- DhWindowPriv *priv;
WebKitWebView *view;
gchar *uri;
- priv = window->priv;
-
view = window_get_active_web_view (window);
uri = dh_link_get_uri (link);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]