AM_GLIB_GNU_GETTEXT
# Checks for libraries.
+PKG_CHECK_EXISTS(gladeui-1.0 >= 3.2.0, [GLADEUI_FOUND=yes], [GLADEUI_FOUND=no])
+
+AM_CONDITIONAL(GLADEUI, test $GLADEUI_FOUND = yes)
+
PKG_CHECK_MODULES(GTKFORM, [gtk+-2.0 >= 2.12.0
libxml-2.0 >= 2.0.0
libgdaex >= 0.1.0
data/Makefile
po/Makefile.in
])
+
+if test $GLADEUI_FOUND = yes; then
+AC_CONFIG_FILES([
+ ui/glade/Makefile
+ ui/glade/icons/Makefile
+ ui/glade/icons/hicolor/Makefile
+ ui/glade/icons/hicolor/16x16/Makefile
+ ui/glade/icons/hicolor/16x16/actions/Makefile
+ ui/glade/icons/hicolor/22x22/Makefile
+ ui/glade/icons/hicolor/22x22/actions/Makefile
+])
+fi
+
AC_OUTPUT
+if GLADEUI
+SUBDIRS = glade
+endif
+
AM_CPPFLAGS = $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
$(GTKFORMUI_CFLAGS) \
--- /dev/null
+SUBDIRS = icons
+
+moduledir = `pkg-config --variable=moduledir gladeui-1.0`
+
+catalogsdir = `pkg-config --variable=catalogdir gladeui-1.0`
+
+catalogs_DATA = gtkformui.xml
+
+EXTRA_DIST = $(catalogs_DATA)
+
+install-exec-hook:
+ cd $(moduledir) && \
+ ln -s -f $(libdir)/libgtkformui.so .
+
+uninstall-hook:
+ rm -f $(moduledir)/libgtkformui.so
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<glade-catalog name="gtkformui" library="gtkformui" depends="gtk+" domain="gtkformui" book="gtkformui">
+
+ <glade-widget-classes>
+ <glade-widget-class name="GtkFormDecoder" generic-name="gtkformdecoder" title="Decoder">
+ <properties>
+ </properties>
+ </glade-widget-class>
+ </glade-widget-classes>
+
+ <glade-widget-group name="gtk-control-display" title="Control and Display">
+ <glade-widget-class-ref name="GtkFormDecoder" />
+ </glade-widget-group>
+
+</glade-catalog>
--- /dev/null
+SUBDIRS = hicolor
--- /dev/null
+SUBDIRS = actions
--- /dev/null
+iconsdir = `pkg-config --variable=pixmapdir gladeui-1.0`/hicolor/16x16/actions
+
+icons_DATA = widget-gtkformui-gtkformdecoder.png
+
+EXTRA_DIST = $(icons_DATA)
--- /dev/null
+SUBDIRS = actions
--- /dev/null
+iconsdir = `pkg-config --variable=pixmapdir gladeui-1.0`/hicolor/22x22/actions
+
+icons_DATA = widget-gtkformui-gtkformdecoder.png
+
+EXTRA_DIST = $(icons_DATA)
--- /dev/null
+SUBDIRS = 16x16 22x22
GValue *value,
GParamSpec *pspec);
+static void gtk_form_decoder_on_btn_browse_clicked (GtkButton *button,
+ gpointer user_data);
+
static GtkWidgetClass *parent_class = NULL;
widget_class->size_request = gtk_form_decoder_size_request;
widget_class->size_allocate = gtk_form_decoder_size_allocate;
+
+ /**
+ * GtkFormDecoder::btn_browse_clicked:
+ * @gtk_form_decoder:
+ *
+ */
+ klass->btn_browse_clicked_signal_id = g_signal_new ("btn-browse-clicked",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
}
static void
{
GtkFormDecoderPrivate *priv = GTK_FORM_DECODER_GET_PRIVATE (decoder);
- priv->hbox = gtk_hbox_new (FALSE, 0);
+ priv->hbox = gtk_hbox_new (FALSE, 5);
gtk_container_add (GTK_CONTAINER (decoder), priv->hbox);
gtk_widget_show (priv->hbox);
priv->txt_decoded = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->txt_decoded, TRUE, TRUE, 0);
+ gtk_editable_set_editable (GTK_EDITABLE (priv->txt_decoded), FALSE);
gtk_widget_show (priv->txt_decoded);
priv->btn_browse = gtk_button_new_with_label ("...");
gtk_widget_set_no_show_all (priv->btn_browse, TRUE);
gtk_widget_show (priv->btn_browse);
+ g_signal_connect (G_OBJECT (priv->btn_browse), "clicked",
+ G_CALLBACK (gtk_form_decoder_on_btn_browse_clicked), (gpointer)decoder);
+
priv->lbl_key = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->lbl_key, FALSE, FALSE, 0);
gtk_widget_set_no_show_all (priv->lbl_key, TRUE);
gtk_widget_size_allocate (bin->child, &child_allocation);
}
}
+
+static void
+gtk_form_decoder_on_btn_browse_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkFormDecoderClass *klass = GTK_FORM_DECODER_GET_CLASS ((GtkFormDecoder *)user_data);
+
+ g_signal_emit (G_OBJECT (user_data), klass->btn_browse_clicked_signal_id, 0);
+}
#define GTK_TYPE_FORM_DECODER (gtk_form_decoder_get_type ())
#define GTK_FORM_DECODER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FORM_DECODER, GtkFormDecoder))
-#define GTK_FORM_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FORM_DECODER, GtkFormDecoder))
+#define GTK_FORM_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FORM_DECODER, GtkFormDecoderClass))
#define GTK_IS_FORM_DECODER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FORM_DECODER))
#define GTK_IS_FORM_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FORM_DECODER))
-#define GTK_FORM_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FORM_DECODER, GtkFormDecoder))
+#define GTK_FORM_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FORM_DECODER, GtkFormDecoderClass))
typedef struct _GtkFormDecoder GtkFormDecoder;
struct _GtkFormDecoderClass
{
GtkBinClass parent_class;
+
+ guint btn_browse_clicked_signal_id;
};