VnBuilder eliminado 2
This commit is contained in:
parent
ffb99fccc3
commit
ca84b97711
|
@ -7,7 +7,6 @@ SUBDIRS = \
|
||||||
vn_lib_LTLIBRARIES = libvn.la
|
vn_lib_LTLIBRARIES = libvn.la
|
||||||
vn_include_HEADERS = \
|
vn_include_HEADERS = \
|
||||||
vn.h \
|
vn.h \
|
||||||
vn-builder.h \
|
|
||||||
vn-field.h \
|
vn-field.h \
|
||||||
vn-column.h \
|
vn-column.h \
|
||||||
vn-login.h \
|
vn-login.h \
|
||||||
|
@ -34,7 +33,6 @@ libvn_la_LIBADD = \
|
||||||
$(top_builddir)/vn/column/libvncolumn.la
|
$(top_builddir)/vn/column/libvncolumn.la
|
||||||
libvn_la_SOURCES = \
|
libvn_la_SOURCES = \
|
||||||
$(vn_include_HEADERS) \
|
$(vn_include_HEADERS) \
|
||||||
vn-builder.c \
|
|
||||||
vn-field.c \
|
vn-field.c \
|
||||||
vn-column.c \
|
vn-column.c \
|
||||||
vn-login.c \
|
vn-login.c \
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#define LOGIN_UI _GUI_DIR"/login.glade"
|
#define LOGIN_UI _GUI_DIR"/login.glade"
|
||||||
|
|
||||||
#define IS_DEFINED(string) (string && g_strcmp0 (string, ""))
|
#define IS_DEFINED(string) (string && g_strcmp0 (string, ""))
|
||||||
|
#define BUILDER_GET(obj, name) ((gpointer) gtk_builder_get_object (obj, name))
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -79,24 +80,24 @@ static void vn_login_show (VnLogin * obj)
|
||||||
{
|
{
|
||||||
gchar * user;
|
gchar * user;
|
||||||
gchar * pass;
|
gchar * pass;
|
||||||
VnBuilder * builder = vn_builder_new ();
|
GtkBuilder * builder = gtk_builder_new ();
|
||||||
|
|
||||||
if (gtk_builder_add_from_file (GTK_BUILDER (builder), LOGIN_UI, NULL))
|
if (gtk_builder_add_from_file (builder, LOGIN_UI, NULL))
|
||||||
{
|
{
|
||||||
obj->window = vn_builder_get (builder, "window");
|
obj->window = BUILDER_GET (builder, "window");
|
||||||
obj->user = vn_builder_get (builder, "user");
|
obj->user = BUILDER_GET (builder, "user");
|
||||||
obj->pass = vn_builder_get (builder, "password");
|
obj->pass = BUILDER_GET (builder, "password");
|
||||||
obj->remember = vn_builder_get (builder, "remember");
|
obj->remember = BUILDER_GET (builder, "remember");
|
||||||
obj->connect = vn_builder_get (builder, "connect");
|
obj->connect = BUILDER_GET (builder, "connect");
|
||||||
obj->stop = vn_builder_get (builder, "stop");
|
obj->stop = BUILDER_GET (builder, "stop");
|
||||||
obj->settings_button = vn_builder_get (builder, "settings");
|
obj->settings_button = BUILDER_GET (builder, "settings");
|
||||||
obj->spinner = vn_builder_get (builder, "spinner");
|
obj->spinner = BUILDER_GET (builder, "spinner");
|
||||||
obj->settings_dialog = vn_builder_get (builder, "settings-dialog");
|
obj->settings_dialog = BUILDER_GET (builder, "settings-dialog");
|
||||||
obj->plugin = vn_builder_get (builder, "plugin");
|
obj->plugin = BUILDER_GET (builder, "plugin");
|
||||||
obj->host = vn_builder_get (builder, "host");
|
obj->host = BUILDER_GET (builder, "host");
|
||||||
obj->schema = vn_builder_get (builder, "schema");
|
obj->schema = BUILDER_GET (builder, "schema");
|
||||||
obj->ssl_ca = vn_builder_get (builder, "ssl-ca");
|
obj->ssl_ca = BUILDER_GET (builder, "ssl-ca");
|
||||||
gtk_builder_connect_signals (GTK_BUILDER (builder), obj);
|
gtk_builder_connect_signals (builder, obj);
|
||||||
|
|
||||||
user = g_settings_get_string (obj->settings, "user");
|
user = g_settings_get_string (obj->settings, "user");
|
||||||
pass = g_settings_get_string (obj->settings, "pass");
|
pass = g_settings_get_string (obj->settings, "pass");
|
||||||
|
|
Reference in New Issue