SF.net SVN: geany: [2152] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Wed Jan 9 13:24:37 UTC 2008
Revision: 2152
http://geany.svn.sourceforge.net/geany/?rev=2152&view=rev
Author: eht16
Date: 2008-01-09 05:24:36 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
Add GeanyWrapLabel (subclass of GtkLabel) to wrap text at any width.
Use GeanyWrapLabel in preferences dialog and plugin manager dialog to save a lot of space and improve layout of descriptive texts.
Modified Paths:
--------------
trunk/ChangeLog
trunk/geany.glade
trunk/src/Makefile.am
trunk/src/interface.c
trunk/src/makefile.win32
trunk/src/plugins.c
trunk/src/prefs.c
trunk/src/vte.c
Added Paths:
-----------
trunk/src/geanywraplabel.c
trunk/src/geanywraplabel.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/ChangeLog 2008-01-09 13:24:36 UTC (rev 2152)
@@ -1,3 +1,13 @@
+2008-01-09 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * geany.glade, src/geanywraplabel.c, src/geanywraplabel.h,
+ src/interface.c, src/plugins.c, src/prefs.c, src/vte.c,
+ src/Makefile.am, src/makefile.win32:
+ Add GeanyWrapLabel (subclass of GtkLabel) to wrap text at any width.
+ Use GeanyWrapLabel in preferences dialog and plugin manager dialog
+ to save a lot of space and improve layout of descriptive texts.
+
+
2008-01-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* geany.nsi, geany_private.rc, README, doc/geany.html, doc/geany.txt,
Modified: trunk/geany.glade
===================================================================
--- trunk/geany.glade 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/geany.glade 2008-01-09 13:24:36 UTC (rev 2152)
@@ -6791,22 +6791,14 @@
<property name="spacing">12</property>
<child>
- <widget class="GtkLabel" id="label17">
+ <widget class="GtkVBox" id="vbox33">
<property name="visible">True</property>
- <property name="label" translatable="yes">Enter tool paths below. Tools you do not need can be left blank.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">6</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -7376,22 +7368,14 @@
<property name="spacing">12</property>
<child>
- <widget class="GtkLabel" id="label120">
+ <widget class="GtkVBox" id="vbox31">
<property name="visible">True</property>
- <property name="label" translatable="yes">Set the information to be used in templates. See the documentation for details.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">6</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -7665,31 +7649,6 @@
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkLabel" id="label132">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><i>Notice: For all changes you make here to take effect, you need to restart Geany.</i></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
</widget>
</child>
</widget>
@@ -7773,22 +7732,14 @@
<property name="spacing">5</property>
<child>
- <widget class="GtkLabel" id="label152">
+ <widget class="GtkVBox" id="vbox32">
<property name="visible">True</property>
- <property name="label" translatable="yes">Here you can change keyboard shortcuts for various actions. Select one and press the Change button to enter a new shortcut, or double click on an action to edit the string representation of the shortcut directly.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_FILL</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">5</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -8270,31 +8221,6 @@
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkLabel" id="label204">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><i>Notice: Native GTK printing is only available if Geany was built against GTK 2.10 (or above) <b>and</b> Geany is running with GTK 2.10 (or above).</i></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.0500000007451</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">5</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
</widget>
<packing>
<property name="tab_expand">False</property>
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/src/Makefile.am 2008-01-09 13:24:36 UTC (rev 2152)
@@ -16,6 +16,7 @@
encodings.c encodings.h \
filetypes.c filetypes.h \
geanyobject.c geanyobject.h \
+ geanywraplabel.c geanywraplabel.h \
highlighting.c highlighting.h \
interface.c interface.h \
keybindings.c keybindings.h \
Added: trunk/src/geanywraplabel.c
===================================================================
--- trunk/src/geanywraplabel.c (rev 0)
+++ trunk/src/geanywraplabel.c 2008-01-09 13:24:36 UTC (rev 2152)
@@ -0,0 +1,179 @@
+/*
+ * geanywraplabel.c - this file is part of Geany, a fast and lightweight IDE
+ *
+ * Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+ * Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $Id$
+ */
+
+/*
+ * A GtkLabel subclass that can wrap to any width, unlike GtkLabel which has a fixed wrap point.
+ * (inspired by libview's WrapLabel, http://view.sourceforge.net)
+ */
+
+
+#include <gtk/gtklabel.h>
+#include "geanywraplabel.h"
+
+
+/* Local data */
+static GObjectClass *parent_class = NULL;
+
+
+
+#define GEANY_WRAP_LABEL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj),\
+ GEANY_WRAP_LABEL_TYPE, GeanyWrapLabelPrivate))
+
+typedef struct
+{
+ gsize wrap_width;
+} GeanyWrapLabelPrivate;
+
+
+static void geany_wrap_label_class_init (GeanyWrapLabelClass *klass);
+static void geany_wrap_label_init (GeanyWrapLabel *self);
+static void geany_wrap_label_finalize (GObject *object);
+
+
+
+GType geany_wrap_label_get_type()
+{
+ static GType type = G_TYPE_INVALID;
+
+ if (G_UNLIKELY(type == G_TYPE_INVALID))
+ {
+ GTypeInfo gwl_info = {
+ sizeof (GeanyWrapLabelClass),
+ NULL, NULL,
+ (GClassInitFunc) geany_wrap_label_class_init,
+ NULL,
+ NULL,
+ sizeof (GeanyWrapLabel),
+ 3,
+ (GInstanceInitFunc) geany_wrap_label_init,
+ NULL
+ };
+
+ type = g_type_register_static(GTK_TYPE_LABEL, "GeanyWrapLabel", &gwl_info, 0);
+ }
+
+ return type;
+}
+
+
+static void geany_wrap_label_class_init(GeanyWrapLabelClass *klass)
+{
+ GObjectClass *g_object_class;
+
+ g_object_class = G_OBJECT_CLASS(klass);
+ g_object_class->finalize = geany_wrap_label_finalize;
+
+ parent_class = (GObjectClass*) g_type_class_peek(G_TYPE_OBJECT);
+ g_type_class_add_private(klass, sizeof (GeanyWrapLabelPrivate));
+}
+
+
+static void geany_wrap_label_init(GeanyWrapLabel *self)
+{
+ GeanyWrapLabelPrivate *priv = GEANY_WRAP_LABEL_GET_PRIVATE(self);
+
+ priv->wrap_width = 0;
+}
+
+
+static void geany_wrap_label_finalize(GObject *object)
+{
+ GeanyWrapLabel *self;
+
+ g_return_if_fail(object != NULL);
+ g_return_if_fail(IS_GEANY_WRAP_LABEL(object));
+
+ self = GEANY_WRAP_LABEL(object);
+
+ if (G_OBJECT_CLASS(parent_class)->finalize)
+ (* G_OBJECT_CLASS(parent_class)->finalize)(object);
+}
+
+
+/* Sets the point at which the text should wrap. */
+static void geany_wrap_label_set_wrap_width(GtkWidget *widget, gsize width)
+{
+ GeanyWrapLabelPrivate *priv;
+ if (width == 0)
+ return;
+
+ /*
+ * We may need to reset the wrap width, so do this regardless of whether
+ * or not we've changed the width.
+ */
+ pango_layout_set_width(gtk_label_get_layout(GTK_LABEL(widget)), width * PANGO_SCALE);
+
+ priv = GEANY_WRAP_LABEL_GET_PRIVATE(widget);
+ if (priv->wrap_width != width)
+ {
+ priv->wrap_width = width;
+ gtk_widget_queue_resize(widget);
+ }
+}
+
+
+/* Forces the height to be the size necessary for the Pango layout, while allowing the
+ * width to be flexible. */
+static void geany_wrap_label_size_request(GtkWidget *widget, GtkRequisition *req, gpointer data)
+{
+ gint height;
+
+ pango_layout_get_pixel_size(gtk_label_get_layout(GTK_LABEL(widget)), NULL, &height);
+
+ req->width = 0;
+ req->height = height;
+}
+
+
+/* Sets the wrap width to the be width allocated to us. */
+static void geany_wrap_label_size_allocate(GtkWidget *widget, GtkAllocation *alloc, gpointer data)
+{
+ gtk_widget_size_allocate(widget, alloc);
+
+ geany_wrap_label_set_wrap_width(widget, alloc->width);
+}
+
+
+void geany_wrap_label_set_text(GtkLabel *label, const gchar *text)
+{
+ GeanyWrapLabelPrivate *priv = GEANY_WRAP_LABEL_GET_PRIVATE(label);
+
+ gtk_label_set_text(label, text);
+ geany_wrap_label_set_wrap_width(GTK_WIDGET(label), priv->wrap_width);
+}
+
+
+GtkWidget *geany_wrap_label_new(const gchar *text)
+{
+ GtkWidget *l = g_object_new(GEANY_WRAP_LABEL_TYPE, NULL);
+
+ gtk_label_set_text(GTK_LABEL(l), text);
+ pango_layout_set_wrap(gtk_label_get_layout(GTK_LABEL(l)), PANGO_WRAP_WORD_CHAR);
+ gtk_misc_set_alignment(GTK_MISC(l), 0.0, 0.0);
+
+ // this is a little ugly but it works (we can't override the default handlers in C)
+ g_signal_connect(l, "size-allocate", G_CALLBACK(geany_wrap_label_size_allocate), NULL);
+ g_signal_connect(l, "size-request", G_CALLBACK(geany_wrap_label_size_request), NULL);
+
+ return l;
+}
Property changes on: trunk/src/geanywraplabel.c
___________________________________________________________________
Name: svn:keywords
+ Id Author Date Revision
Name: svn:eol-style
+ native
Added: trunk/src/geanywraplabel.h
===================================================================
--- trunk/src/geanywraplabel.h (rev 0)
+++ trunk/src/geanywraplabel.h 2008-01-09 13:24:36 UTC (rev 2152)
@@ -0,0 +1,61 @@
+/*
+ * geanywraplabel.h - this file is part of Geany, a fast and lightweight IDE
+ *
+ * Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+ * Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $Id$
+ */
+
+#ifndef __GEANY_WRAP_LABEL_H__
+#define __GEANY_WRAP_LABEL_H__
+
+G_BEGIN_DECLS
+
+
+#define GEANY_WRAP_LABEL_TYPE (geany_wrap_label_get_type())
+#define GEANY_WRAP_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
+ GEANY_WRAP_LABEL_TYPE, GeanyWrapLabel))
+#define GEANY_WRAP_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
+ GEANY_WRAP_LABEL_TYPE, GeanyWrapLabelClass))
+#define IS_GEANY_WRAP_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
+ GEANY_WRAP_LABEL_TYPE))
+#define IS_GEANY_WRAP_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ GEANY_WRAP_LABEL_TYPE))
+
+
+typedef struct _GeanyWrapLabel GeanyWrapLabel;
+typedef struct _GeanyWrapLabelClass GeanyWrapLabelClass;
+
+struct _GeanyWrapLabel
+{
+ GtkLabel parent;
+};
+
+struct _GeanyWrapLabelClass
+{
+ GtkLabelClass parent_class;
+};
+
+GType geany_wrap_label_get_type (void);
+GtkWidget* geany_wrap_label_new (const gchar *text);
+void geany_wrap_label_set_text (GtkLabel *label, const gchar *text);
+
+
+G_END_DECLS
+
+#endif /* __GEANY_WRAP_LABEL_H__ */
Property changes on: trunk/src/geanywraplabel.h
___________________________________________________________________
Name: svn:keywords
+ Id Author Date Revision
Name: svn:eol-style
+ native
Modified: trunk/src/interface.c
===================================================================
--- trunk/src/interface.c 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/src/interface.c 2008-01-09 13:24:36 UTC (rev 2152)
@@ -2682,7 +2682,7 @@
GtkWidget *frame20;
GtkWidget *alignment23;
GtkWidget *vbox2;
- GtkWidget *label17;
+ GtkWidget *vbox33;
GtkWidget *table1;
GtkWidget *label11;
GtkWidget *label97;
@@ -2713,7 +2713,7 @@
GtkWidget *frame21;
GtkWidget *alignment24;
GtkWidget *vbox9;
- GtkWidget *label120;
+ GtkWidget *vbox31;
GtkWidget *table6;
GtkWidget *entry_template_mail;
GtkWidget *entry_template_initial;
@@ -2725,13 +2725,12 @@
GtkWidget *label130;
GtkWidget *label131;
GtkWidget *entry_template_developer;
- GtkWidget *label132;
GtkWidget *label180;
GtkWidget *label119;
GtkWidget *frame22;
GtkWidget *alignment25;
GtkWidget *vbox13;
- GtkWidget *label152;
+ GtkWidget *vbox32;
GtkWidget *scrolledwindow8;
GtkWidget *treeview7;
GtkWidget *alignment10;
@@ -2762,7 +2761,6 @@
GtkWidget *label203;
GtkWidget *entry_print_dateformat;
GtkWidget *radio_print_gtk;
- GtkWidget *label204;
GtkWidget *label201;
GtkWidget *dialog_action_area3;
GtkWidget *button3;
@@ -3962,11 +3960,9 @@
gtk_widget_show (vbox2);
gtk_container_add (GTK_CONTAINER (alignment23), vbox2);
- label17 = gtk_label_new (_("Enter tool paths below. Tools you do not need can be left blank."));
- gtk_widget_show (label17);
- gtk_box_pack_start (GTK_BOX (vbox2), label17, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
- gtk_misc_set_padding (GTK_MISC (label17), 0, 6);
+ vbox33 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (vbox33);
+ gtk_box_pack_start (GTK_BOX (vbox2), vbox33, FALSE, FALSE, 0);
table1 = gtk_table_new (4, 3, FALSE);
gtk_widget_show (table1);
@@ -4137,12 +4133,9 @@
gtk_widget_show (vbox9);
gtk_container_add (GTK_CONTAINER (alignment24), vbox9);
- label120 = gtk_label_new (_("Set the information to be used in templates. See the documentation for details."));
- gtk_widget_show (label120);
- gtk_box_pack_start (GTK_BOX (vbox9), label120, FALSE, FALSE, 0);
- gtk_label_set_line_wrap (GTK_LABEL (label120), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label120), 0, 0.5);
- gtk_misc_set_padding (GTK_MISC (label120), 0, 6);
+ vbox31 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (vbox31);
+ gtk_box_pack_start (GTK_BOX (vbox9), vbox31, FALSE, FALSE, 0);
table6 = gtk_table_new (5, 2, FALSE);
gtk_widget_show (table6);
@@ -4220,13 +4213,6 @@
(GtkAttachOptions) (0), 0, 0);
gtk_tooltips_set_tip (tooltips, entry_template_developer, _("The name of the developer"), NULL);
- label132 = gtk_label_new (_("<i>Notice: For all changes you make here to take effect, you need to restart Geany.</i>"));
- gtk_widget_show (label132);
- gtk_box_pack_start (GTK_BOX (vbox9), label132, FALSE, FALSE, 0);
- gtk_label_set_use_markup (GTK_LABEL (label132), TRUE);
- gtk_label_set_line_wrap (GTK_LABEL (label132), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label132), 0, 0.5);
-
label180 = gtk_label_new (_("<b>Template data</b>"));
gtk_widget_show (label180);
gtk_frame_set_label_widget (GTK_FRAME (frame21), label180);
@@ -4250,13 +4236,9 @@
gtk_widget_show (vbox13);
gtk_container_add (GTK_CONTAINER (alignment25), vbox13);
- label152 = gtk_label_new (_("Here you can change keyboard shortcuts for various actions. Select one and press the Change button to enter a new shortcut, or double click on an action to edit the string representation of the shortcut directly."));
- gtk_widget_show (label152);
- gtk_box_pack_start (GTK_BOX (vbox13), label152, FALSE, TRUE, 0);
- gtk_label_set_justify (GTK_LABEL (label152), GTK_JUSTIFY_FILL);
- gtk_label_set_line_wrap (GTK_LABEL (label152), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label152), 0, 0);
- gtk_misc_set_padding (GTK_MISC (label152), 0, 5);
+ vbox32 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (vbox32);
+ gtk_box_pack_start (GTK_BOX (vbox13), vbox32, FALSE, TRUE, 0);
scrolledwindow8 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow8);
@@ -4403,13 +4385,6 @@
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_print_gtk), radio_print_external_group);
radio_print_external_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_print_gtk));
- label204 = gtk_label_new (_("<i>Notice: Native GTK printing is only available if Geany was built against GTK 2.10 (or above) <b>and</b> Geany is running with GTK 2.10 (or above).</i>"));
- gtk_widget_show (label204);
- gtk_box_pack_start (GTK_BOX (vbox27), label204, FALSE, TRUE, 5);
- gtk_label_set_use_markup (GTK_LABEL (label204), TRUE);
- gtk_label_set_line_wrap (GTK_LABEL (label204), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label204), 0.05, 0.5);
-
label201 = gtk_label_new (_("Printing"));
gtk_widget_show (label201);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 9), label201);
@@ -4637,7 +4612,7 @@
GLADE_HOOKUP_OBJECT (prefs_dialog, frame20, "frame20");
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment23, "alignment23");
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox2, "vbox2");
- GLADE_HOOKUP_OBJECT (prefs_dialog, label17, "label17");
+ GLADE_HOOKUP_OBJECT (prefs_dialog, vbox33, "vbox33");
GLADE_HOOKUP_OBJECT (prefs_dialog, table1, "table1");
GLADE_HOOKUP_OBJECT (prefs_dialog, label11, "label11");
GLADE_HOOKUP_OBJECT (prefs_dialog, label97, "label97");
@@ -4668,7 +4643,7 @@
GLADE_HOOKUP_OBJECT (prefs_dialog, frame21, "frame21");
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment24, "alignment24");
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox9, "vbox9");
- GLADE_HOOKUP_OBJECT (prefs_dialog, label120, "label120");
+ GLADE_HOOKUP_OBJECT (prefs_dialog, vbox31, "vbox31");
GLADE_HOOKUP_OBJECT (prefs_dialog, table6, "table6");
GLADE_HOOKUP_OBJECT (prefs_dialog, entry_template_mail, "entry_template_mail");
GLADE_HOOKUP_OBJECT (prefs_dialog, entry_template_initial, "entry_template_initial");
@@ -4680,13 +4655,12 @@
GLADE_HOOKUP_OBJECT (prefs_dialog, label130, "label130");
GLADE_HOOKUP_OBJECT (prefs_dialog, label131, "label131");
GLADE_HOOKUP_OBJECT (prefs_dialog, entry_template_developer, "entry_template_developer");
- GLADE_HOOKUP_OBJECT (prefs_dialog, label132, "label132");
GLADE_HOOKUP_OBJECT (prefs_dialog, label180, "label180");
GLADE_HOOKUP_OBJECT (prefs_dialog, label119, "label119");
GLADE_HOOKUP_OBJECT (prefs_dialog, frame22, "frame22");
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment25, "alignment25");
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox13, "vbox13");
- GLADE_HOOKUP_OBJECT (prefs_dialog, label152, "label152");
+ GLADE_HOOKUP_OBJECT (prefs_dialog, vbox32, "vbox32");
GLADE_HOOKUP_OBJECT (prefs_dialog, scrolledwindow8, "scrolledwindow8");
GLADE_HOOKUP_OBJECT (prefs_dialog, treeview7, "treeview7");
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment10, "alignment10");
@@ -4716,7 +4690,6 @@
GLADE_HOOKUP_OBJECT (prefs_dialog, label203, "label203");
GLADE_HOOKUP_OBJECT (prefs_dialog, entry_print_dateformat, "entry_print_dateformat");
GLADE_HOOKUP_OBJECT (prefs_dialog, radio_print_gtk, "radio_print_gtk");
- GLADE_HOOKUP_OBJECT (prefs_dialog, label204, "label204");
GLADE_HOOKUP_OBJECT (prefs_dialog, label201, "label201");
GLADE_HOOKUP_OBJECT_NO_REF (prefs_dialog, dialog_action_area3, "dialog_action_area3");
GLADE_HOOKUP_OBJECT (prefs_dialog, button3, "button3");
Modified: trunk/src/makefile.win32
===================================================================
--- trunk/src/makefile.win32 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/src/makefile.win32 2008-01-09 13:24:36 UTC (rev 2152)
@@ -55,9 +55,10 @@
CCFLAGS=-Wall -O2 -g -mms-bitfields $(DEFINES) $(INCLUDEDIRS)
OBJS = about.o build.o callbacks.o dialogs.o document.o editor.o encodings.o filetypes.o \
- geanyobject.o highlighting.o interface.o keybindings.o keyfile.o main.o msgwindow.o \
- navqueue.o notebook.o plugins.o prefs.o printing.o project.o sciwrappers.o search.o \
- socket.o support.o symbols.o templates.o treeviews.o tools.o ui_utils.o utils.o win32.o
+ geanyobject.o geanywraplabel.o highlighting.o interface.o keybindings.o keyfile.o \
+ main.o msgwindow.o navqueue.o notebook.o plugins.o prefs.o printing.o project.o \
+ sciwrappers.o search.o socket.o support.o symbols.o templates.o treeviews.o tools.o \
+ ui_utils.o utils.o win32.o
.c.o:
$(CC) $(CCFLAGS) -c $<
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/src/plugins.c 2008-01-09 13:24:36 UTC (rev 2152)
@@ -48,6 +48,7 @@
#include "msgwindow.h"
#include "prefs.h"
#include "geanyobject.h"
+#include "geanywraplabel.h"
#include "build.h"
#include "encodings.h"
#include "search.h"
@@ -705,7 +706,7 @@
_("Plugin: %s %s\nDescription: %s\nAuthor(s): %s"),
pi->name, pi->version, pi->description, pi->author);
- gtk_label_set_text(GTK_LABEL(pm_widgets.description_label), text);
+ geany_wrap_label_set_text(GTK_LABEL(pm_widgets.description_label), text);
g_free(text);
gtk_widget_set_sensitive(pm_widgets.configure_button,
@@ -870,9 +871,7 @@
label2 = gtk_label_new(_("<b>Plugin details:</b>"));
gtk_label_set_use_markup(GTK_LABEL(label2), TRUE);
gtk_misc_set_alignment(GTK_MISC(label2), 0, 0.5);
- pm_widgets.description_label = gtk_label_new("");
- gtk_label_set_line_wrap(GTK_LABEL(pm_widgets.description_label), TRUE);
- gtk_misc_set_alignment(GTK_MISC(pm_widgets.description_label), 0, 0.5);
+ pm_widgets.description_label = geany_wrap_label_new("");
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), label2, TRUE, TRUE, 0);
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/src/prefs.c 2008-01-09 13:24:36 UTC (rev 2152)
@@ -48,6 +48,7 @@
#include "main.h"
#include "treeviews.h"
#include "printing.h"
+#include "geanywraplabel.h"
#ifdef HAVE_VTE
# include "vte.h"
@@ -1304,6 +1305,7 @@
if (ui_widgets.prefs_dialog == NULL)
{
GtkWidget *combo_new, *combo_open;
+ GtkWidget *label;
guint i;
gchar *encoding_string;
@@ -1324,6 +1326,35 @@
g_free(encoding_string);
}
+ // add manually GeanyWrapLabels because it can't be added with Glade
+ // page Tools
+ label = geany_wrap_label_new(_("Enter tool paths below. Tools you do not need can be left blank."));
+ gtk_widget_show(label);
+ gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox31")),
+ label, FALSE, TRUE, 5);
+ // page Templates
+ label = geany_wrap_label_new(_("Set the information to be used in templates. See the documentation for details."));
+ gtk_widget_show(label);
+ gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox33")),
+ label, FALSE, TRUE, 5);
+ label = geany_wrap_label_new(_("<i>Notice: For all changes you make here to take effect, you need to restart Geany.</i>"));
+ gtk_widget_show(label);
+ gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
+ gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox9")),
+ label, FALSE, TRUE, 5);
+ // page Keybindings
+ label = geany_wrap_label_new(_("Here you can change keyboard shortcuts for various actions. Select one and press the Change button to enter a new shortcut, or double click on an action to edit the string representation of the shortcut directly."));
+ gtk_widget_show(label);
+ gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox32")),
+ label, FALSE, TRUE, 5);
+ // page Printing
+ label = geany_wrap_label_new(_("<i>Notice: Native GTK printing is only available if Geany was built against GTK 2.10 (or above) <b>and</b> Geany is running with GTK 2.10 (or above).</i>"));
+ gtk_widget_show(label);
+ gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
+ gtk_box_pack_start(GTK_BOX(lookup_widget(ui_widgets.prefs_dialog, "vbox27")),
+ label, FALSE, TRUE, 5);
+
+
#ifdef HAVE_VTE
vte_append_preferences_tab();
#endif
Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c 2008-01-06 19:59:01 UTC (rev 2151)
+++ trunk/src/vte.c 2008-01-09 13:24:36 UTC (rev 2152)
@@ -41,6 +41,7 @@
#include "utils.h"
#include "document.h"
#include "callbacks.h"
+#include "geanywraplabel.h"
VteInfo vte_info;
@@ -648,7 +649,7 @@
label = gtk_label_new(_("Terminal"));
vte_prefs_tab_num = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label);
- label = gtk_label_new(_("These settings for the virtual terminal emulator widget (VTE) only apply if the VTE library could be loaded."));
+ label = geany_wrap_label_new(_("These settings for the virtual terminal emulator widget (VTE) only apply if the VTE library could be loaded."));
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 6);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_FILL);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list