Replaced C++ style comments with the more portable ISO C syntax.
* gladeui/*.[ch]: Replaced C++ style comments with the more portable ISO C syntax. * gladeui/glade-app.[ch]: Use the G_DEFINE_TYPE() and g_type_class_add_private() idioms for registering the class. * README.cvs: Renamed to 'README.svn'. * plugins/gtk+/icons/16x16/Makefile.am, plugins/gtk+/icons/22x22/Makefile.am: Added some icons. * src/glade-project-window.c: Set the label for the Selector toolbutton. svn path=/trunk/; revision=1080
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2007-02-06 Vincent Geddes <vincent.geddes@gmail.com>
|
||||
|
||||
* gladeui/*.[ch]: Replaced C++ style comments with the more portable ISO C syntax.
|
||||
|
||||
* gladeui/glade-app.[ch]: Use the G_DEFINE_TYPE() and
|
||||
g_type_class_add_private() idioms for registering the class.
|
||||
|
||||
* README.cvs: Renamed to 'README.svn'.
|
||||
|
||||
* plugins/gtk+/icons/16x16/Makefile.am, plugins/gtk+/icons/22x22/Makefile.am:
|
||||
Added some icons.
|
||||
|
||||
2007-02-07 Paul <ephraim_owns@hotmail.com>
|
||||
|
||||
* bindings/python/Makefile.am: Removed $(top_srcdir) from CFLAGS.
|
||||
|
6
README
@ -30,7 +30,7 @@ About Glade-3
|
||||
|
||||
This version of Glade (Glade-3) is a complete rewrite of the original Glade codebase.
|
||||
|
||||
One of the main differnces from glade-2 is that C code generation has been removed from
|
||||
One of the main differences from glade-2 is that C code generation has been removed from
|
||||
glade-3: this has been done on purpose, since using generated code is deprecated; the preferred
|
||||
way to use glade files is with libglade (if code generation is needed, this can be provided
|
||||
as another tool or plugin, code generation is simply not a part of the glade-3 project).
|
||||
@ -45,7 +45,7 @@ It has a few useful new features such as stacked Undo/Redo and Multiple Project
|
||||
and respects the same XML format as glade-2.
|
||||
|
||||
For a more details on what has changed, what still needs work, etc. see
|
||||
the NEWS file & the glade-3 product at bugzilla.gnome.org.
|
||||
the NEWS file & the glade3 product at bugzilla.gnome.org.
|
||||
Comments, bug reports and patches are more than welcome.
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ generated by Glade. (We do not consider the code generated by Glade to be
|
||||
Requirements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
o GTK+ 2.8.0 or above - http://www.gtk.org
|
||||
o GTK+ 2.10.0 or above - http://www.gtk.org
|
||||
You also need the glib, pango and atk libraries.
|
||||
Make sure you have the devel packages as well, as these will contain the
|
||||
header files which you will need to compile C applications.
|
||||
|
@ -20,14 +20,7 @@
|
||||
* Naba Kumar <naba@gnome.org>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include "glade.h"
|
||||
#include "glade-clipboard-view.h"
|
||||
@ -39,12 +32,30 @@
|
||||
#include "glade-marshallers.h"
|
||||
#include "glade-accumulators.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <gtk/gtkstock.h>
|
||||
|
||||
struct _GladeAppPriv {
|
||||
#define GLADE_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GLADE_TYPE_APP, GladeAppPrivate))
|
||||
|
||||
/* Class private member data */
|
||||
enum
|
||||
{
|
||||
WIDGET_EVENT,
|
||||
UPDATE_UI,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_ACTIVE_PROJECT
|
||||
};
|
||||
|
||||
struct _GladeAppPrivate
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
GladePalette *palette; /* See glade-palette */
|
||||
@ -67,20 +78,6 @@ struct _GladeAppPriv {
|
||||
GList *undo_list, *redo_list; /* Lists of buttons to refresh in update-ui signal */
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
WIDGET_EVENT,
|
||||
UPDATE_UI,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_ACTIVE_PROJECT
|
||||
};
|
||||
|
||||
static guint glade_app_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
gchar *glade_scripts_dir = GLADE_SCRIPTSDIR;
|
||||
@ -92,8 +89,9 @@ gchar *glade_pixmaps_dir = GLADE_PIXMAPSDIR;
|
||||
gchar *glade_locale_dir = GLADE_LOCALEDIR;
|
||||
gboolean glade_verbose = FALSE;
|
||||
|
||||
static GObjectClass * parent_class = NULL;
|
||||
static GladeApp * the_app = NULL;
|
||||
static GladeApp *singleton_app = NULL;
|
||||
|
||||
G_DEFINE_TYPE (GladeApp, glade_app, G_TYPE_OBJECT);
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
@ -104,15 +102,22 @@ glade_app_constructor (GType type,
|
||||
guint n_construct_properties,
|
||||
GObjectConstructParam *construct_properties)
|
||||
{
|
||||
GObject *object;
|
||||
|
||||
/* Singleton */
|
||||
if (!the_app)
|
||||
the_app = (GladeApp *)parent_class->constructor
|
||||
(type, n_construct_properties, construct_properties);
|
||||
/* singleton */
|
||||
if (!singleton_app)
|
||||
{
|
||||
object = G_OBJECT_CLASS (glade_app_parent_class)->constructor (type,
|
||||
n_construct_properties,
|
||||
construct_properties);
|
||||
singleton_app = GLADE_APP (object);
|
||||
}
|
||||
else
|
||||
g_object_ref (the_app);
|
||||
{
|
||||
g_object_ref (singleton_app);
|
||||
}
|
||||
|
||||
return G_OBJECT (the_app);
|
||||
return G_OBJECT (singleton_app);
|
||||
}
|
||||
|
||||
|
||||
@ -120,7 +125,7 @@ glade_app_constructor (GType type,
|
||||
static void
|
||||
glade_app_dispose (GObject *app)
|
||||
{
|
||||
GladeAppPriv *priv = GLADE_APP (app)->priv;
|
||||
GladeAppPrivate *priv = GLADE_APP_GET_PRIVATE (app);
|
||||
|
||||
if (priv->editor)
|
||||
{
|
||||
@ -145,8 +150,7 @@ glade_app_dispose (GObject *app)
|
||||
priv->config = NULL;
|
||||
}
|
||||
|
||||
if (parent_class->dispose)
|
||||
parent_class->dispose (app);
|
||||
G_OBJECT_CLASS (glade_app_parent_class)->dispose (app);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -167,9 +171,7 @@ glade_app_finalize (GObject *app)
|
||||
|
||||
glade_catalog_modules_close ();
|
||||
|
||||
g_free (GLADE_APP (app)->priv);
|
||||
if (parent_class->finalize)
|
||||
parent_class->finalize (app);
|
||||
G_OBJECT_CLASS (glade_app_parent_class)->finalize (app);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -310,6 +312,8 @@ glade_app_init (GladeApp *app)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
|
||||
app->priv = GLADE_APP_GET_PRIVATE (app);
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
@ -334,7 +338,6 @@ glade_app_init (GladeApp *app)
|
||||
|
||||
initialized = TRUE;
|
||||
}
|
||||
app->priv = g_new0 (GladeAppPriv, 1);
|
||||
|
||||
app->priv->accel_group = NULL;
|
||||
|
||||
@ -375,10 +378,8 @@ static void
|
||||
glade_app_class_init (GladeAppClass * klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
g_return_if_fail (klass != NULL);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
object_class = (GObjectClass *) klass;
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->constructor = glade_app_constructor;
|
||||
object_class->dispose = glade_app_dispose;
|
||||
@ -437,32 +438,8 @@ glade_app_class_init (GladeAppClass * klass)
|
||||
_("The active project"),
|
||||
GLADE_TYPE_PROJECT, G_PARAM_READWRITE));
|
||||
|
||||
}
|
||||
|
||||
GType
|
||||
glade_app_get_type ()
|
||||
{
|
||||
static GType obj_type = 0;
|
||||
|
||||
if (!obj_type)
|
||||
{
|
||||
static const GTypeInfo obj_info =
|
||||
{
|
||||
sizeof (GladeAppClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) glade_app_class_init,
|
||||
(GClassFinalizeFunc) NULL,
|
||||
NULL, /* class_data */
|
||||
sizeof (GladeApp),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) glade_app_init,
|
||||
NULL /* value_table */
|
||||
};
|
||||
obj_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GladeApp", &obj_info, 0);
|
||||
}
|
||||
return obj_type;
|
||||
g_type_class_add_private (klass, sizeof (GladeAppPrivate));
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
@ -630,9 +607,9 @@ glade_app_set_transient_parent (GtkWindow *parent)
|
||||
|
||||
/* Loop over all projects/widgets and set_transient_for the toplevels.
|
||||
*/
|
||||
for (projects = glade_app_get_projects (); // projects
|
||||
for (projects = glade_app_get_projects (); /* projects */
|
||||
projects; projects = projects->next)
|
||||
for (objects = GLADE_PROJECT (projects->data)->objects; // widgets
|
||||
for (objects = GLADE_PROJECT (projects->data)->objects; /* widgets */
|
||||
objects; objects = objects->next)
|
||||
if (GTK_IS_WINDOW (objects->data))
|
||||
gtk_window_set_transient_for
|
||||
@ -653,9 +630,9 @@ glade_app_get_transient_parent (void)
|
||||
GladeApp *
|
||||
glade_app_get (void)
|
||||
{
|
||||
if (!the_app)
|
||||
if (!singleton_app)
|
||||
g_critical ("No available GladeApp");
|
||||
return the_app;
|
||||
return singleton_app;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -19,6 +19,7 @@
|
||||
* Authors:
|
||||
* Naba Kumar <naba@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __GLADE_APP_H__
|
||||
#define __GLADE_APP_H__
|
||||
|
||||
@ -39,13 +40,15 @@ G_BEGIN_DECLS
|
||||
#define GLADE_APP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_APP, GladeAppClass))
|
||||
|
||||
typedef struct _GladeApp GladeApp;
|
||||
typedef struct _GladeAppPrivate GladeAppPrivate;
|
||||
typedef struct _GladeAppClass GladeAppClass;
|
||||
typedef struct _GladeAppPriv GladeAppPriv;
|
||||
|
||||
struct _GladeApp
|
||||
{
|
||||
GObject parent;
|
||||
GladeAppPriv *priv;
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
GladeAppPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GladeAppClass
|
||||
@ -53,7 +56,8 @@ struct _GladeAppClass
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* class methods */
|
||||
void (* show_properties) (GladeApp* app, gboolean raise);
|
||||
void (* show_properties) (GladeApp* app,
|
||||
gboolean raise);
|
||||
void (* hide_properties) (GladeApp* app);
|
||||
|
||||
/* signals */
|
||||
|
@ -104,7 +104,7 @@ list_stock_items (gboolean include_images)
|
||||
|
||||
|
||||
/* Add first "no stock" element */
|
||||
value.value_nick = g_strdup ("glade-none"); // Passing ownership here.
|
||||
value.value_nick = g_strdup ("glade-none"); /* Passing ownership here */
|
||||
value.value_name = g_strdup ("None");
|
||||
value.value = 0;
|
||||
values = g_array_append_val (values, value);
|
||||
@ -124,7 +124,7 @@ list_stock_items (gboolean include_images)
|
||||
|
||||
value.value = stock_enum++;
|
||||
value.value_name = g_strdup (item.label);
|
||||
value.value_nick = stock_id; // Passing ownership here.
|
||||
value.value_nick = stock_id; /* Passing ownership here */
|
||||
values = g_array_append_val (values, value);
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ static gboolean
|
||||
param_accel_validate (GParamSpec *pspec,
|
||||
GValue *value)
|
||||
{
|
||||
//GladeParamSpecAccel *aspec = GLADE_PARAM_SPEC_ACCEL (pspec);
|
||||
/* GladeParamSpecAccel *aspec = GLADE_PARAM_SPEC_ACCEL (pspec); */
|
||||
GList *accels, *list, *toremove = NULL;
|
||||
GladeAccelInfo *info;
|
||||
|
||||
|
@ -377,7 +377,7 @@ glade_clipboard_view_refresh_sel (GladeClipboardView *view)
|
||||
(GTK_TREE_MODEL (view->model), widget, 0)) != NULL)
|
||||
{
|
||||
gtk_tree_selection_select_iter (sel, iter);
|
||||
// gtk_tree_iter_free (iter);
|
||||
/* gtk_tree_iter_free (iter); */
|
||||
}
|
||||
}
|
||||
view->updating = FALSE;
|
||||
|
@ -87,7 +87,7 @@ void glade_command_set_properties (GladeProperty *property,
|
||||
...);
|
||||
LIBGLADEUI_API
|
||||
void glade_command_set_properties_list (GladeProject *project,
|
||||
GList *props); // list of GCSetPropData
|
||||
GList *props); /* list of GCSetPropData */
|
||||
|
||||
/************************** name ******************************/
|
||||
LIBGLADEUI_API
|
||||
|
@ -179,7 +179,7 @@ glade_custom_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||
gdk_draw_line (event->window, dark_gc, 0, h - 1, w - 1, h - 1);
|
||||
gdk_draw_line (event->window, dark_gc, w - 1, 0, w - 1, h - 1);
|
||||
|
||||
// glade_util_queue_draw_nodes (event->window);
|
||||
/* glade_util_queue_draw_nodes (event->window); */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
#ifndef __GLADE_EDITOR_PROPERTY_H__
|
||||
#define __GLADE_EDITOR_PROPERTY_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLADE_TYPE_EDITOR_PROPERTY (glade_editor_property_get_type())
|
||||
#define GLADE_EDITOR_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_EDITOR_PROPERTY, GladeEditorProperty))
|
||||
@ -99,4 +100,6 @@ void glade_editor_property_show_info (GladeEditorProperty *
|
||||
LIBGLADEUI_API
|
||||
void glade_editor_property_hide_info (GladeEditorProperty *eprop);
|
||||
|
||||
#endif // __GLADE_EDITOR_PROPERTY_H__
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLADE_EDITOR_PROPERTY_H__ */
|
||||
|
@ -782,7 +782,7 @@ glade_fixed_event (GladeWidget *gwidget_fixed,
|
||||
|
||||
switch (event->type)
|
||||
{
|
||||
case GDK_BUTTON_PRESS: // add widget
|
||||
case GDK_BUTTON_PRESS: /* add widget */
|
||||
if (((GdkEventButton *) event)->button == 1)
|
||||
{
|
||||
|
||||
|
@ -650,7 +650,7 @@ glade_property_get_type (void)
|
||||
{
|
||||
static const GTypeInfo property_info =
|
||||
{
|
||||
sizeof (GladePropertyKlass), // Klass is our class
|
||||
sizeof (GladePropertyKlass), /* Klass is our class */
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) glade_property_klass_init,
|
||||
|
@ -3,6 +3,7 @@
|
||||
iconsdir = $(pkgdatadir)/pixmaps/16x16
|
||||
|
||||
icons_DATA = \
|
||||
assistant.png \
|
||||
alignment.png \
|
||||
aspectframe.png \
|
||||
accellabel.png \
|
||||
@ -51,6 +52,7 @@ icons_DATA = \
|
||||
layout.png \
|
||||
list.png \
|
||||
listitem.png \
|
||||
linkbutton.png \
|
||||
menu.png \
|
||||
menuitem.png \
|
||||
menutoolbutton.png \
|
||||
@ -59,9 +61,11 @@ icons_DATA = \
|
||||
notebook.png \
|
||||
optionmenu.png \
|
||||
progressbar.png \
|
||||
pagesetupdialog.png \
|
||||
radiobutton.png \
|
||||
radiomenuitem.png \
|
||||
radiotoolbutton.png \
|
||||
recentchooser.png \
|
||||
ruler.png \
|
||||
scrolledwindow.png \
|
||||
spinbutton.png \
|
||||
|
BIN
plugins/gtk+/icons/16x16/assistant.png
Normal file
After Width: | Height: | Size: 179 B |
BIN
plugins/gtk+/icons/16x16/linkbutton.png
Normal file
After Width: | Height: | Size: 121 B |
BIN
plugins/gtk+/icons/16x16/pagesetupdialog.png
Normal file
After Width: | Height: | Size: 267 B |
BIN
plugins/gtk+/icons/16x16/recentchooser.png
Normal file
After Width: | Height: | Size: 330 B |
@ -3,6 +3,7 @@
|
||||
iconsdir = $(pkgdatadir)/pixmaps/22x22
|
||||
|
||||
icons_DATA = \
|
||||
assistant.png \
|
||||
alignment.png \
|
||||
aspectframe.png \
|
||||
accellabel.png \
|
||||
@ -51,6 +52,7 @@ icons_DATA = \
|
||||
layout.png \
|
||||
list.png \
|
||||
listitem.png \
|
||||
linkbutton.png \
|
||||
menu.png \
|
||||
menuitem.png \
|
||||
menubar.png \
|
||||
@ -59,10 +61,12 @@ icons_DATA = \
|
||||
notebook.png \
|
||||
optionmenu.png \
|
||||
progressbar.png \
|
||||
pagesetupdialog.png \
|
||||
radiobutton.png \
|
||||
ruler.png \
|
||||
radiomenuitem.png \
|
||||
radiotoolbutton.png \
|
||||
recentchooser.png \
|
||||
scrolledwindow.png \
|
||||
spinbutton.png \
|
||||
statusbar.png \
|
||||
|
BIN
plugins/gtk+/icons/22x22/assistant.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
plugins/gtk+/icons/22x22/linkbutton.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
plugins/gtk+/icons/22x22/pagesetupdialog.png
Normal file
After Width: | Height: | Size: 358 B |
BIN
plugins/gtk+/icons/22x22/recentchooser.png
Normal file
After Width: | Height: | Size: 432 B |
@ -1945,10 +1945,11 @@ create_selector_tool_button (GtkToolbar *toolbar)
|
||||
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (button), TRUE);
|
||||
|
||||
gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (button), image);
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (button), _("Select Widgets"));
|
||||
|
||||
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (button),
|
||||
toolbar->tooltips,
|
||||
_("Select a widget"),
|
||||
_("Select widgets in the workspace"),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (button));
|
||||
|