[Goodies-commits] r6714 - in xfce4-notes-plugin/trunk: . panel-plugin

Mike Massonnet mmassonnet at xfce.org
Thu Feb 19 12:05:06 CET 2009


Author: mmassonnet
Date: 2009-02-19 11:05:06 +0000 (Thu, 19 Feb 2009)
New Revision: 6714

Modified:
   xfce4-notes-plugin/trunk/ChangeLog
   xfce4-notes-plugin/trunk/panel-plugin/notes.c
Log:
Replace icons against labels for the buttons in the window

Modified: xfce4-notes-plugin/trunk/ChangeLog
===================================================================
--- xfce4-notes-plugin/trunk/ChangeLog	2009-02-19 06:33:33 UTC (rev 6713)
+++ xfce4-notes-plugin/trunk/ChangeLog	2009-02-19 11:05:06 UTC (rev 6714)
@@ -1,3 +1,11 @@
+2009-02-19  Mike Massonnet <mmassonnet at xfce.org>
+
+Replace icons against labels for the buttons in the window
+	* panel-plugin/notes.c(notes_window_new_with_label):
+	  - Use labels instead of images inside the buttons
+	* panel-plugin/notes.c(notes_note_new):
+	  - Set margin properties for the textview
+
 2008-11-22  Mike Massonnet <mmassonnet at xfce.org>
 
 === Release 1.6.3 ===

Modified: xfce4-notes-plugin/trunk/panel-plugin/notes.c
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/notes.c	2009-02-19 06:33:33 UTC (rev 6713)
+++ xfce4-notes-plugin/trunk/panel-plugin/notes.c	2009-02-19 11:05:06 UTC (rev 6714)
@@ -171,7 +171,7 @@
   DBG ("New window: %s", window_name);
 
   NotesWindow          *notes_window;
-  GtkWidget            *img_add, *img_del, *img_close, *arrow_menu;
+  GtkWidget            *label, *arrow_menu;
   gchar                *window_name_tmp;
   gchar                *accel_name;
 
@@ -228,9 +228,9 @@
   /* Add button */
   notes_window->btn_add = xfce_create_panel_button ();
   gtk_widget_set_size_request (notes_window->btn_add, 22, 22);
-  img_add = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
-  gtk_container_add (GTK_CONTAINER (notes_window->btn_add),
-                     img_add);
+  label = gtk_label_new (NULL);
+  gtk_label_set_markup (GTK_LABEL (label), "<b>+</b>");
+  gtk_container_add (GTK_CONTAINER (notes_window->btn_add), label);
   gtk_box_pack_start (GTK_BOX (notes_window->hbox),
                       notes_window->btn_add,
                       FALSE,
@@ -241,9 +241,9 @@
   /* Remove button */
   notes_window->btn_del = xfce_create_panel_button ();
   gtk_widget_set_size_request (notes_window->btn_del, 22, 22);
-  img_del = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
-  gtk_container_add (GTK_CONTAINER (notes_window->btn_del),
-                     img_del);
+  label = gtk_label_new (NULL);
+  gtk_label_set_markup (GTK_LABEL (label), "<b>−</b>");
+  gtk_container_add (GTK_CONTAINER (notes_window->btn_del), label);
   gtk_box_pack_start (GTK_BOX (notes_window->hbox),
                       notes_window->btn_del,
                       FALSE,
@@ -287,9 +287,9 @@
   /* Close button */
   notes_window->btn_close = xfce_create_panel_button ();
   gtk_widget_set_size_request (notes_window->btn_close, 22, 22);
-  img_close = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
-  gtk_container_add (GTK_CONTAINER (notes_window->btn_close),
-                     img_close);
+  label = gtk_label_new (NULL);
+  gtk_label_set_markup (GTK_LABEL (label), "<b>×</b>");
+  gtk_container_add (GTK_CONTAINER (notes_window->btn_close), label);
   gtk_box_pack_start (GTK_BOX (notes_window->hbox),
                       notes_window->btn_close,
                       FALSE,
@@ -1613,10 +1613,16 @@
 
   /* Text view */
   notes_note->text_view = gtk_text_view_new ();
+  g_object_set (notes_note->text_view,
+                "wrap-mode", GTK_WRAP_WORD,
+                "left-margin", 2,
+                "right-margin", 2,
+                "pixels-above-lines", 1,
+                "pixels-below-lines", 1,
+                NULL);
   buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (notes_note->text_view));
   gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (buffer), &iter, 0);
   gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (buffer), "undo-pos", &iter, FALSE);
-  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (notes_note->text_view), GTK_WRAP_WORD);
   if (NULL != notes_note->notes_window->font)
     notes_note_set_font (notes_note, notes_note->notes_window->font);
   gtk_container_add (GTK_CONTAINER (notes_note->scrolled_window),




More information about the Goodies-commits mailing list