Removed bunch of unused variables

master
Yevgen Muntyan 2011-09-10 23:51:30 -07:00
parent a22cf21e3b
commit 29eb6fc357
8 changed files with 3 additions and 25 deletions

View File

@ -358,7 +358,6 @@ moo_app_constructor (GType type,
GObjectConstructParam *params)
{
GObject *object;
MooApp *app;
if (moo_app_data.instance != NULL)
{
@ -368,7 +367,6 @@ moo_app_constructor (GType type,
}
object = moo_app_parent_class->constructor (type, n_params, params);
app = MOO_APP (object);
#if defined(HAVE_SIGNAL) && defined(SIGINT)
setup_signals (sigint_handler);

View File

@ -2255,7 +2255,6 @@ moo_editor_create_doc (MooEditor *editor,
GError **error)
{
MooEdit *doc;
MooEditView *view;
GFile *file = NULL;
moo_return_error_if_fail_p (MOO_IS_EDITOR (editor));
@ -2264,7 +2263,6 @@ moo_editor_create_doc (MooEditor *editor,
file = g_file_new_for_path (filename);
doc = g_object_new (get_doc_type (editor), "editor", editor, (const char*) NULL);
view = moo_edit_get_view (doc);
if (file == NULL || _moo_edit_load_file (doc, file, encoding, NULL, error))
{

View File

@ -2990,7 +2990,7 @@ draw_left_margin (MooTextView *view,
GtkTextView *text_view;
GtkTextBuffer *buffer;
PangoLayout *layout = NULL;
int line, last_line, current_line, text_width, window_width, mark_icon_width;
int line, current_line, text_width, window_width, mark_icon_width;
GdkRectangle area;
GtkTextIter iter;
char str[32];
@ -3019,9 +3019,6 @@ draw_left_margin (MooTextView *view,
area.x, area.y,
&area.x, &area.y);
gtk_text_view_get_line_at_y (text_view, &iter, area.y + area.height - 1, NULL);
last_line = gtk_text_iter_get_line (&iter);
gtk_text_view_get_line_at_y (text_view, &iter, area.y, NULL);
line = gtk_text_iter_get_line (&iter);
@ -3107,7 +3104,7 @@ draw_marks_background (MooTextView *view,
GdkEventExpose *event)
{
GtkTextView *text_view;
int line, last_line, window_width;
int line, window_width;
GdkRectangle area;
GtkTextIter iter;
@ -3122,9 +3119,6 @@ draw_marks_background (MooTextView *view,
gdk_drawable_get_size (event->window, &window_width, NULL);
window_width -= gtk_text_view_get_left_margin (text_view);
gtk_text_view_get_line_at_y (text_view, &iter, area.y + area.height - 1, NULL);
last_line = gtk_text_iter_get_line (&iter);
gtk_text_view_get_line_at_y (text_view, &iter, area.y, NULL);
line = gtk_text_iter_get_line (&iter);

View File

@ -546,13 +546,12 @@ move_pane_config (MooBigPaned *paned,
{
GSList *old_link;
MooBigPanedConfig *config = paned->priv->config;
MooPanedConfig *old_pc, *new_pc;
MooPanedConfig *old_pc;
g_return_if_fail (new_index >= 0);
g_return_if_fail (g_hash_table_lookup (config->panes, id) != NULL);
old_pc = &config->paned[old_pos];
new_pc = &config->paned[new_pos];
old_link = g_slist_find_custom (old_pc->order, id, (GCompareFunc) strcmp);
g_return_if_fail (old_link != NULL);

View File

@ -531,9 +531,6 @@ enc_mgr_add_used (EncodingsManager *mgr,
{
GSList *l;
gboolean found_recent;
guint n_recent;
n_recent = g_slist_length (mgr->recent);
for (l = mgr->recent, found_recent = FALSE; l != NULL; l = l->next)
{

View File

@ -3620,7 +3620,6 @@ moo_notebook_set_focus_child (GtkContainer *container,
Page *page;
GtkWidget *focus_child, *window;
MooNotebook *nb = MOO_NOTEBOOK (container);
FocusType old_focus;
window = gtk_widget_get_toplevel (GTK_WIDGET (nb));
@ -3646,9 +3645,6 @@ moo_notebook_set_focus_child (GtkContainer *container,
}
}
/* XXX should it be used? */
old_focus = nb->priv->focus;
if (child)
{
if (nb->priv->focus_page)

View File

@ -382,7 +382,6 @@ prefs_new_key_from_string (const char *key,
const char *value,
int prefs_kind)
{
PrefsStore *prefs;
PrefsItem *item;
GValue string_val = { 0 };
GValue real_val = { 0 };
@ -409,7 +408,6 @@ prefs_new_key_from_string (const char *key,
g_value_init (&real_val, value_type);
_moo_value_convert (&string_val, &real_val);
prefs = prefs_instance ();
item = prefs_get_item (key);
if (!item)

View File

@ -464,14 +464,12 @@ moo_command_run (MooCommand *cmd,
MooCommandContext *ctx)
{
MooEdit *doc;
MooEditWindow *window;
g_return_if_fail (MOO_IS_COMMAND (cmd));
g_return_if_fail (MOO_IS_COMMAND_CONTEXT (ctx));
g_return_if_fail (MOO_COMMAND_GET_CLASS (cmd)->run != NULL);
doc = moo_command_context_get_doc (ctx);
window = moo_command_context_get_window (ctx);
g_return_if_fail (check_context (cmd->options, doc));