mirror of https://github.com/djcb/mu.git
* toys/mug2: simple welcome message in mug2
This commit is contained in:
parent
965b34fd70
commit
36d0c664aa
|
@ -140,3 +140,15 @@ mug_msg_view_set_msg (MugMsgView * self, const char *msgpath)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
mug_msg_view_set_note (MugMsgView * self, const char* html)
|
||||||
|
{
|
||||||
|
MugMsgViewPrivate *priv;
|
||||||
|
g_return_if_fail (MUG_IS_MSG_VIEW (self));
|
||||||
|
|
||||||
|
priv = MUG_MSG_VIEW_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
mu_msg_view_set_note (MU_MSG_VIEW (priv->_view), html);
|
||||||
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ GType mug_msg_view_get_type (void) G_GNUC_CONST;
|
||||||
/* if this is a kind of GtkWidget, it should probably return at GtkWidget* */
|
/* if this is a kind of GtkWidget, it should probably return at GtkWidget* */
|
||||||
GtkWidget* mug_msg_view_new (void);
|
GtkWidget* mug_msg_view_new (void);
|
||||||
gboolean mug_msg_view_set_msg (MugMsgView * self, const char *msgpath);
|
gboolean mug_msg_view_set_msg (MugMsgView * self, const char *msgpath);
|
||||||
|
void mug_msg_view_set_note (MugMsgView * self, const char* html);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __MUG_MSG_VIEW_H__ */
|
#endif /* __MUG_MSG_VIEW_H__ */
|
||||||
|
|
|
@ -318,8 +318,10 @@ mug_query_area (MugData * mugdata)
|
||||||
gtk_paned_add1 (GTK_PANED (paned), scrolled);
|
gtk_paned_add1 (GTK_PANED (paned), scrolled);
|
||||||
|
|
||||||
mugdata->msgview = mug_msg_view_new ();
|
mugdata->msgview = mug_msg_view_new ();
|
||||||
|
mug_msg_view_set_note (MUG_MSG_VIEW(mugdata->msgview),
|
||||||
mug_msg_view_set_msg (MUG_MSG_VIEW (mugdata->msgview), NULL);
|
"<h1>Welcome to <i>mug</i>!</h1><hr>"
|
||||||
|
"<tt>mug</tt> is an experimental UI for <tt>mu</tt>, which will "
|
||||||
|
"slowly evolve into something useful.<br><br>Enjoy the ride.");
|
||||||
g_signal_connect (G_OBJECT (mugdata->mlist), "msg-selected",
|
g_signal_connect (G_OBJECT (mugdata->mlist), "msg-selected",
|
||||||
G_CALLBACK (on_msg_selected), mugdata);
|
G_CALLBACK (on_msg_selected), mugdata);
|
||||||
g_signal_connect (G_OBJECT (mugdata->mlist), "error-occured",
|
g_signal_connect (G_OBJECT (mugdata->mlist), "error-occured",
|
||||||
|
|
Loading…
Reference in New Issue