[Goodies-commits] r1833 - in xfce4-notes-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Wed Aug 2 03:52:13 CEST 2006
Author: mmassonnet
Date: 2006-08-02 01:52:11 +0000 (Wed, 02 Aug 2006)
New Revision: 1833
Modified:
xfce4-notes-plugin/trunk/ChangeLog
xfce4-notes-plugin/trunk/panel-plugin/notes-window.c
xfce4-notes-plugin/trunk/panel-plugin/notes-window.h
Log:
* panel-plugin/notes-window.{c,h}: Remove hbox, pack the text
label directly in the tab.
Remove set_tab_border (it is said to be deprecated in newly
written code).
Try a new design for the tabs. They are packed at left from
bottom to top.
Modified: xfce4-notes-plugin/trunk/ChangeLog
===================================================================
--- xfce4-notes-plugin/trunk/ChangeLog 2006-08-02 00:22:00 UTC (rev 1832)
+++ xfce4-notes-plugin/trunk/ChangeLog 2006-08-02 01:52:11 UTC (rev 1833)
@@ -5,7 +5,14 @@
pixels (that's a 50/50 :)), set the label angle to 90°.
Correct the note_page_destroy to empty the first page instead
of doing nothing.
+ * panel-plugin/notes-window.{c,h}: Remove hbox, pack the text
+ label directly in the tab.
+ Remove set_tab_border (it is said to be deprecated in newly
+ written code).
+ Try a new design for the tabs. They are packed at left from
+ bottom to top.
+
2006-08-01 Jannis Pohlmann <jannis at xfce.org>
* configure.in.in: Fixed LINGUAS (removed the quotes around it).
Modified: xfce4-notes-plugin/trunk/panel-plugin/notes-window.c
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/notes-window.c 2006-08-02 00:22:00 UTC (rev 1832)
+++ xfce4-notes-plugin/trunk/panel-plugin/notes-window.c 2006-08-02 01:52:11 UTC (rev 1833)
@@ -187,6 +187,7 @@
NotePage *page;
Note *note;
GtkTextBuffer *buffer;
+ gint id;
gchar note_id[8];
DBG ("Create a new page");
@@ -194,19 +195,14 @@
page = g_new0 (NotePage, 1);
note = notes->note;
note->pages = g_list_append (note->pages, page);
+ id = g_list_length (note->pages);
- /* HBox */
- page->hbox = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (page->hbox);
-
/* Label */
- g_snprintf (note_id, 8, "%d", g_list_length (note->pages));
+ g_snprintf (note_id, 8, "%d", id);
page->label = gtk_label_new (note_id);
gtk_widget_show (page->label);
gtk_label_set_angle (GTK_LABEL (page->label), 90);
- gtk_label_set_justify (GTK_LABEL (page->label), GTK_JUSTIFY_RIGHT);
- gtk_box_pack_start (GTK_BOX (page->hbox), page->label, TRUE, TRUE, 0);
/* Scrolled window + Text view */
page->scroll = gtk_scrolled_window_new (NULL, NULL);
@@ -225,11 +221,13 @@
/* Append the widget to the notebook */
page->id = gtk_notebook_append_page (GTK_NOTEBOOK (note->notebook),
- page->scroll, page->hbox);
+ page->scroll, page->label);
+ gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (note->notebook),
+ page->scroll, FALSE, FALSE,
+ GTK_PACK_END);
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (note->notebook),
(gboolean) page->id);
-
note_page_load_data (plugin, page);
g_signal_connect (page->text, "key-press-event",
Modified: xfce4-notes-plugin/trunk/panel-plugin/notes-window.h
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/notes-window.h 2006-08-02 00:22:00 UTC (rev 1832)
+++ xfce4-notes-plugin/trunk/panel-plugin/notes-window.h 2006-08-02 01:52:11 UTC (rev 1833)
@@ -22,7 +22,6 @@
typedef struct
{
- GtkWidget *hbox;
GtkWidget *label;
GtkWidget *scroll;
GtkWidget *text;
More information about the Goodies-commits
mailing list