Commit 8e927be5 authored by Jean-Noel Guiheneuf's avatar Jean-Noel Guiheneuf

*** empty log message ***

parent fcaccfa2
2005-06-14 Jean-Noel Guiheneuf <guiheneuf.jean-noel@wanadoo.fr>
* plugins/message-view/anjuta-message-manager-plugin.glade :
renamed "messages.tag.position" to "messages.tab.position".
plugins/message-view/anjuta-msgman.c :
Messages tab position prefrences.
2005-06-14 Naba Kumar <naba@gnome.org>
* (new) plugins/tools/scripts/find-fixmes.pl,
......
......@@ -500,6 +500,7 @@ write_message_pane(IAnjutaMessageView* view, FileBuffer *fb, SearchEntry *se, Ma
if (SE_BUFFER == se->type)
{
g_print("FBPATH %s\n", fb->path);
tmp = g_strrstr(fb->path, "/");
tmp = g_strndup(fb->path, tmp + 1 -(fb->path));
snprintf(buf, BUFSIZ, "%s%s:%ld:%s\n", tmp, se->te->filename,
......
......@@ -175,7 +175,7 @@
</child>
<child>
<widget class="GtkOptionMenu" id="preferences_menu:text:Top,Bottom,Left,Right:0:messages.tag.position">
<widget class="GtkOptionMenu" id="preferences_menu:text:Top,Bottom,Left,Right:0:messages.tab.position">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="history">0</property>
......
......@@ -23,6 +23,9 @@
#include "anjuta-msgman.h"
#include "message-view.h"
#define MESSAGES_TABS_POS "messages.tab.position"
struct _AnjutaMsgmanPriv
{
AnjutaPreferences *preferences;
......@@ -159,20 +162,57 @@ anjuta_msgman_class_init (AnjutaMsgmanClass * klass)
gobject_class->dispose = anjuta_msgman_dispose;
}
static void
set_message_tab(AnjutaPreferences *pref, GtkNotebook *msgman)
{
gchar *tab_pos;
GtkPositionType pos;
tab_pos = anjuta_preferences_get (pref, MESSAGES_TABS_POS);
pos = GTK_POS_TOP;
if (tab_pos)
{
if (strcasecmp (tab_pos, "left") == 0)
pos = GTK_POS_LEFT;
else if (strcasecmp (tab_pos, "right") == 0)
pos = GTK_POS_RIGHT;
else if (strcasecmp (tab_pos, "bottom") == 0)
pos = GTK_POS_BOTTOM;
}
gtk_notebook_set_tab_pos (msgman, pos);
g_free (tab_pos);
}
static void
on_gconf_notify_message_pref (GConfClient *gclient, guint cnxn_id,
GConfEntry *entry, gpointer user_data)
{
AnjutaPreferences *pref;
pref = ANJUTA_MSGMAN (user_data)->priv->preferences;
set_message_tab(pref, GTK_NOTEBOOK (user_data));
}
GtkWidget*
anjuta_msgman_new (AnjutaPreferences *pref, GtkWidget *popup_menu)
{
guint notify_id;
GtkWidget *msgman = NULL;
msgman = gtk_widget_new (ANJUTA_TYPE_MSGMAN, NULL);
if (msgman)
{
ANJUTA_MSGMAN (msgman)->priv->preferences = pref;
ANJUTA_MSGMAN (msgman)->priv->popup_menu = popup_menu;
#warning "TODO: Set tab position"
set_message_tab(pref, GTK_NOTEBOOK (msgman));
notify_id = anjuta_preferences_notify_add (pref, MESSAGES_TABS_POS,
on_gconf_notify_message_pref, GTK_NOTEBOOK (msgman), NULL);
}
return msgman;
}
ANJUTA_TYPE_BEGIN (AnjutaMsgman, anjuta_msgman, GTK_TYPE_NOTEBOOK);
ANJUTA_TYPE_END;
......
......@@ -500,6 +500,7 @@ write_message_pane(IAnjutaMessageView* view, FileBuffer *fb, SearchEntry *se, Ma
if (SE_BUFFER == se->type)
{
g_print("FBPATH %s\n", fb->path);
tmp = g_strrstr(fb->path, "/");
tmp = g_strndup(fb->path, tmp + 1 -(fb->path));
snprintf(buf, BUFSIZ, "%s%s:%ld:%s\n", tmp, se->te->filename,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment