aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2012-10-08 04:40:41 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2012-10-08 07:29:58 +0200
commit492daa3ce371f150ab927ceb22d95bf09f372812 (patch)
tree92ec1b1378a1114bdf2c5bebd0d1d7a83f1f85c7 /src
parent24b4e9956b381fe0f9447a6c35ae72ca3e0caabc (diff)
downloadlogdiag-492daa3ce371f150ab927ceb22d95bf09f372812.tar.gz
logdiag-492daa3ce371f150ab927ceb22d95bf09f372812.tar.xz
logdiag-492daa3ce371f150ab927ceb22d95bf09f372812.zip
Show symbol names in the statusbar again..
Not very clean but serves its purpose.
Diffstat (limited to 'src')
-rw-r--r--src/ld-window-main.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index 0be7700..698ffc5 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -90,6 +90,11 @@ static gboolean may_close_diagram (LdWindowMain *self,
const gchar *dialog_message);
static gboolean may_quit (LdWindowMain *self);
+static void on_symbol_selected (LdCategoryView *view,
+ LdSymbol *symbol, const gchar *path, LdWindowMain *self);
+static void on_symbol_deselected (LdCategoryView *view,
+ LdSymbol *symbol, const gchar *path, LdWindowMain *self);
+
static void on_action_new (GtkAction *action, LdWindowMain *self);
static void on_action_open (GtkAction *action, LdWindowMain *self);
static void on_action_save (GtkAction *action, LdWindowMain *self);
@@ -341,6 +346,11 @@ ld_window_main_init (LdWindowMain *self)
ld_category_view_set_category (LD_CATEGORY_VIEW (priv->library_view),
ld_library_get_root (priv->library));
+ g_signal_connect_after (priv->library_view, "symbol-selected",
+ G_CALLBACK (on_symbol_selected), self);
+ g_signal_connect_after (priv->library_view, "symbol-deselected",
+ G_CALLBACK (on_symbol_deselected), self);
+
diagram_set_filename (self, NULL);
priv->statusbar_hint_drag = gtk_statusbar_push
@@ -842,6 +852,25 @@ may_quit (LdWindowMain *self)
/* ===== User interface actions ============================================ */
static void
+on_symbol_selected (LdCategoryView *view,
+ LdSymbol *symbol, const gchar *path, LdWindowMain *self)
+{
+ const gchar *symbol_name;
+
+ symbol_name = ld_symbol_get_human_name (symbol);
+ gtk_statusbar_push (GTK_STATUSBAR (self->priv->statusbar),
+ self->priv->statusbar_menu_context_id, symbol_name);
+}
+
+static void
+on_symbol_deselected (LdCategoryView *view,
+ LdSymbol *symbol, const gchar *path, LdWindowMain *self)
+{
+ gtk_statusbar_pop (GTK_STATUSBAR (self->priv->statusbar),
+ self->priv->statusbar_menu_context_id);
+}
+
+static void
on_view_zoom_changed (LdDiagramView *view, GParamSpec *pspec,
LdWindowMain *self)
{