[gnome-font-viewer] font-view: refresh Install button appearance when model changes
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-font-viewer] font-view: refresh Install button appearance when model changes
- Date: Thu, 3 May 2012 17:36:44 +0000 (UTC)
commit 94dbcc0e825b8cd7d7fbcb5efd7d5c5ace99d42e
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu May 3 13:07:47 2012 -0400
font-view: refresh Install button appearance when model changes
So that we can e.g. change it to "Installed" when the font is copied
over to ~/.fonts.
src/font-view.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/font-view.c b/src/font-view.c
index 8651891..cc695b6 100644
--- a/src/font-view.c
+++ b/src/font-view.c
@@ -322,6 +322,16 @@ font_install_finished_cb (GObject *source_object,
}
static void
+font_model_config_changed_cb (FontViewModel *model,
+ gpointer user_data)
+{
+ FontViewApplication *self = user_data;
+
+ if (self->font_file != NULL)
+ install_button_refresh_appearance (self, NULL);
+}
+
+static void
install_button_clicked_cb (GtkButton *button,
gpointer user_data)
{
@@ -646,6 +656,8 @@ font_view_application_startup (GApplication *application)
g_object_unref (menu);
self->model = font_view_model_new ();
+ g_signal_connect (self->model, "config-changed",
+ G_CALLBACK (font_model_config_changed_cb), self);
self->main_window = window = gtk_application_window_new (GTK_APPLICATION (application));
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]