aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-20 18:57:33 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-28 11:18:26 (GMT)
commitde11c66a4db904367903fde2f8b9cdf31806bfe0 (patch)
treeaf4df6a1ff7321f649dd540505c93ddf14b4406d
parent984651b9a27686552cc0a95578cd8f647e36f689 (diff)
Use GtkStatusbar instead of GnomeAppBar
No need to use the gnome-specific widget. Just use the default Gtk one. That should make easier when converting this to Gtk 3. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--data/camorama.glade4
-rw-r--r--src/callbacks.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/data/camorama.glade b/data/camorama.glade
index 0f78aa7..7d08062 100644
--- a/data/camorama.glade
+++ b/data/camorama.glade
@@ -606,12 +606,10 @@
</packing>
</child>
<child>
- <widget class="GnomeAppBar" id="status">
+ <widget class="GtkStatusbar" id="status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
- <property name="has_progress">True</property>
- <property name="has_status">True</property>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/callbacks.c b/src/callbacks.c
index 3b30b92..ad50f69 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -578,13 +578,14 @@ gint timeout_func (cam * cam)
gint fps (GtkWidget * sb)
{
gchar *stat;
+ guint cont = gtk_statusbar_get_context_id (GTK_STATUSBAR(sb), "context");
seconds++;
stat = g_strdup_printf (_("%.2f fps - current %.2f fps - average"),
(float) frames / (float) (2),
(float) frames2 / (float) (seconds * 2));
frames = 0;
- gnome_appbar_push (GNOME_APPBAR (sb), stat);
+ gtk_statusbar_push (GTK_STATUSBAR(sb), cont, stat);
g_free (stat);
return 1;
}

Privacy Policy