[anjuta] document-manager: Fix various compile warnings.
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] document-manager: Fix various compile warnings.
- Date: Sat, 10 Nov 2012 20:59:48 +0000 (UTC)
commit 4af5aa07c3c8841bc99b18524675ee5cc3cdc2c6
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Thu Sep 27 11:00:59 2012 +0200
document-manager: Fix various compile warnings.
Remove some instances of unused variables and usage of deprecated functions.
Completely remove the custom styling of the tab close button since it looks good without it
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=687327
plugins/document-manager/anjuta-bookmarks.c | 20 ++++----------------
plugins/document-manager/anjuta-docman.c | 11 -----------
plugins/document-manager/plugin.c | 9 +--------
3 files changed, 5 insertions(+), 35 deletions(-)
---
diff --git a/plugins/document-manager/anjuta-bookmarks.c b/plugins/document-manager/anjuta-bookmarks.c
index e67f52f..2748431 100644
--- a/plugins/document-manager/anjuta-bookmarks.c
+++ b/plugins/document-manager/anjuta-bookmarks.c
@@ -294,7 +294,7 @@ anjuta_bookmarks_init (AnjutaBookmarks *bookmarks)
GtkWidget* item_rename;
GtkWidget* item_remove;
- priv->window = gtk_vbox_new (FALSE, 5);
+ priv->window = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(scrolled_window),
GTK_SHADOW_ETCHED_IN);
@@ -328,7 +328,7 @@ anjuta_bookmarks_init (AnjutaBookmarks *bookmarks)
g_signal_connect (G_OBJECT(selection), "changed", G_CALLBACK(on_selection_changed),
bookmarks);
- priv->grip = gtk_hbox_new (FALSE, 0);
+ priv->grip = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
priv->button_add = gtk_button_new();
gtk_widget_set_tooltip_text (priv->button_add,
_("Add bookmark"));
@@ -940,15 +940,9 @@ void
anjuta_bookmarks_next (AnjutaBookmarks* bookmarks, IAnjutaEditor* editor,
gint line)
{
- IAnjutaIterable* end_pos;
- gint end_line;
GList* marks = get_bookmarks_for_editor (bookmarks, editor);
GList* node;
-
- end_pos = ianjuta_editor_get_end_position (editor, NULL);
- end_line = ianjuta_editor_get_line_from_position (editor, end_pos, NULL);
- g_object_unref (end_pos);
-
+
for (node = marks; node != NULL; node = g_list_next (node))
{
gint node_line = GPOINTER_TO_INT (node->data);
@@ -964,15 +958,9 @@ void
anjuta_bookmarks_prev (AnjutaBookmarks* bookmarks, IAnjutaEditor* editor,
gint line)
{
- IAnjutaIterable* end_pos;
- gint end_line;
GList* marks = get_bookmarks_for_editor (bookmarks, editor);
GList* node;
-
- end_pos = ianjuta_editor_get_end_position (editor, NULL);
- end_line = ianjuta_editor_get_line_from_position (editor, end_pos, NULL);
- g_object_unref (end_pos);
-
+
marks = g_list_reverse (marks);
for (node = marks; node != NULL; node = g_list_next (node))
diff --git a/plugins/document-manager/anjuta-docman.c b/plugins/document-manager/anjuta-docman.c
index 474d94c..7bd9c45 100644
--- a/plugins/document-manager/anjuta-docman.c
+++ b/plugins/document-manager/anjuta-docman.c
@@ -448,8 +448,6 @@ anjuta_docman_page_init (AnjutaDocman *docman, IAnjutaDocument *doc,
gtk_container_add(GTK_CONTAINER(close_button), close_pixmap);
gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE);
- gtk_widget_set_name (close_button, "anjuta-tab-close-button");
-
gtk_widget_set_size_request (close_button, w, h);
gtk_widget_set_tooltip_text (close_button, _("Close file"));
@@ -902,15 +900,6 @@ anjuta_docman_class_init (AnjutaDocmanClass *klass)
G_TYPE_OBJECT);
}
-
- gtk_rc_parse_string ("style \"anjuta-tab-close-button-style\"\n"
- "{\n"
- "GtkWidget::focus-padding = 0\n"
- "GtkWidget::focus-line-width = 0\n"
- "xthickness = 0\n"
- "ythickness = 0\n"
- "}\n"
- "widget \"*.anjuta-tab-close-button\" style \"anjuta-tab-close-button-style\"");
}
GtkWidget*
diff --git a/plugins/document-manager/plugin.c b/plugins/document-manager/plugin.c
index c35ca46..665e46f 100644
--- a/plugins/document-manager/plugin.c
+++ b/plugins/document-manager/plugin.c
@@ -1280,13 +1280,10 @@ on_window_key_press_event (AnjutaShell *shell,
GdkEventKey *event,
DocmanPlugin *plugin)
{
- gint modifiers;
gint i;
g_return_val_if_fail (event != NULL, FALSE);
- modifiers = event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK);
-
for (i = 0; global_keymap[i].id; i++)
if (event->keyval == global_keymap[i].gdk_key &&
(event->state & global_keymap[i].modifiers) == global_keymap[i].modifiers)
@@ -1595,12 +1592,10 @@ on_notify_timer (GSettings* settings,
gpointer user_data)
{
DocmanPlugin *plugin;
- AnjutaDocman *docman;
gint auto_save_timer;
gboolean auto_save;
plugin = ANJUTA_PLUGIN_DOCMAN (user_data);
- docman = ANJUTA_DOCMAN (plugin->docman);
auto_save_timer = g_settings_get_int(settings, AUTOSAVE_TIMER);
auto_save = g_settings_get_boolean(settings, SAVE_AUTOMATIC);
@@ -1724,7 +1719,7 @@ activate_plugin (AnjutaPlugin *plugin)
/* Add UI */
dplugin->uiid = anjuta_ui_merge (ui, UI_FILE);
- dplugin->vbox = gtk_vbox_new (FALSE, 0);
+ dplugin->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (dplugin->vbox);
gtk_box_pack_start (GTK_BOX(dplugin->vbox), docman, TRUE, TRUE, 0);
anjuta_shell_add_widget_full (plugin->shell, dplugin->vbox,
@@ -1780,7 +1775,6 @@ deactivate_plugin (AnjutaPlugin *plugin)
// GtkIconFactory *icon_factory;
DocmanPlugin *eplugin;
AnjutaUI *ui;
- AnjutaStatus *status;
GList *node;
DEBUG_PRINT ("%s", "DocmanPlugin: Deactivating document manager pluginâ");
@@ -1793,7 +1787,6 @@ deactivate_plugin (AnjutaPlugin *plugin)
G_CALLBACK (on_save_prompt), plugin);
ui = anjuta_shell_get_ui (plugin->shell, NULL);
- status = anjuta_shell_get_status (plugin->shell, NULL);
g_signal_handlers_disconnect_by_func (G_OBJECT (eplugin->docman),
G_CALLBACK (on_document_changed),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]