[gucharmap] Drop the search progress bar
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Drop the search progress bar
- Date: Fri, 27 Jan 2012 17:53:02 +0000 (UTC)
commit ff3c835b3d1ddea9df1326ff95dda77c44b6aa25
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Jan 27 10:19:33 2012 -0500
Drop the search progress bar
It looks very silly and, at least on my computer, you can barely see a
flicker in it before the search is done. Would be better not to have it
at all.
https://bugzilla.gnome.org/show_bug.cgi?id=668852
gucharmap/gucharmap-window.c | 34 +---------------------------------
gucharmap/gucharmap-window.h | 4 ----
2 files changed, 1 insertions(+), 37 deletions(-)
---
diff --git a/gucharmap/gucharmap-window.c b/gucharmap/gucharmap-window.c
index 92af5d1..218c1a8 100644
--- a/gucharmap/gucharmap-window.c
+++ b/gucharmap/gucharmap-window.c
@@ -150,26 +150,6 @@ status_message (GtkWidget *widget,
gtk_statusbar_push (GTK_STATUSBAR (guw->status), 0, message);
}
-static gboolean
-update_progress_bar (GucharmapWindow *guw)
-{
- gdouble fraction_completed;
-
- fraction_completed = gucharmap_search_dialog_get_completed (GUCHARMAP_SEARCH_DIALOG (guw->search_dialog));
-
- if (fraction_completed < 0 || fraction_completed > 1)
- {
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (guw->progress), 0);
- gtk_progress_bar_set_text (GTK_PROGRESS_BAR (guw->progress), NULL);
- return FALSE;
- }
- else
- {
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (guw->progress), fraction_completed);
- return TRUE;
- }
-}
-
static void
search_start (GucharmapSearchDialog *search_dialog,
GucharmapWindow *guw)
@@ -187,9 +167,6 @@ search_start (GucharmapSearchDialog *search_dialog,
gtk_action_set_sensitive (action, FALSE);
action = gtk_action_group_get_action (guw->action_group, "FindPrevious");
gtk_action_set_sensitive (action, FALSE);
-
- gtk_progress_bar_set_text (GTK_PROGRESS_BAR (guw->progress), _("Searchingâ"));
- g_timeout_add (100, (GSourceFunc) update_progress_bar, guw);
}
static void
@@ -199,9 +176,6 @@ search_finish (GucharmapSearchDialog *search_dialog,
{
GtkAction *action;
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (guw->progress), 0);
- gtk_progress_bar_set_text (GTK_PROGRESS_BAR (guw->progress), NULL);
-
if (found_char != (gunichar)(-1))
gucharmap_charmap_set_active_character (guw->charmap, found_char);
/* not-found dialog handled by GucharmapSearchDialog */
@@ -939,17 +913,11 @@ gucharmap_window_init (GucharmapWindow *guw)
g_signal_connect (chartable, "activate", G_CALLBACK (insert_character_in_text_to_copy), guw);
/* Finally the statusbar */
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (big_vbox), hbox, FALSE, FALSE, 0);
-
guw->status = gtk_statusbar_new ();
- gtk_box_pack_start (GTK_BOX (hbox), guw->status, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (big_vbox), guw->status, FALSE, FALSE, 0);
gtk_widget_show (guw->status);
g_signal_connect (guw->status, "realize", G_CALLBACK (status_realize), guw);
- guw->progress = gtk_progress_bar_new ();
- gtk_box_pack_start (GTK_BOX (hbox), guw->progress, FALSE, FALSE, 0);
-
#if 0
grip = gtk_statusbar_new ();
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (grip), TRUE);
diff --git a/gucharmap/gucharmap-window.h b/gucharmap/gucharmap-window.h
index 490a42b..e75f2eb 100644
--- a/gucharmap/gucharmap-window.h
+++ b/gucharmap/gucharmap-window.h
@@ -53,8 +53,6 @@ struct _GucharmapWindow
GtkWidget *search_dialog; /* takes care of all aspects of searching */
- GtkWidget *progress;
-
guint save_last_char_idle_id;
GtkPageSetup *page_setup;
@@ -77,8 +75,6 @@ GtkWidget * gucharmap_window_new (void);
void gucharmap_window_set_font (GucharmapWindow *guw,
const char *font);
-GdkCursor *_gucharmap_window_progress_cursor (void);
-
G_END_DECLS
#endif /* #ifndef GUCHARMAP_WINDOW_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]