Skip to content
Snippets Groups Projects
Commit 994dd62a authored by deuce's avatar deuce
Browse files

Add a C version of the glade file and an install target to the CMake file.

parent ab6fe14d
No related branches found
No related tags found
No related merge requests found
......@@ -8,12 +8,15 @@ find_package(GTK2 2.6 COMPONENTS gtk)
if(GTK2_FOUND)
add_executable(gtkmonitor
gtkmonitor.c
gtkmonitor_glade.c
util_funcs.c
events.c
)
double_require_libs(gtkmonitor sbbs xpdev smblib)
double_require_libs(gtkmonitor sbbs xpdev smblib comio)
target_include_directories(gtkmonitor PRIVATE ..)
target_link_libraries(gtkmonitor ${GTK2_LIBRARIES})
target_include_directories(gtkmonitor PRIVATE ${GTK2_INCLUDE_DIRS})
target_compile_definitions(gtkmonitor PRIVATE ${GTK2_DEFINITIONS})
install(TARGETS gtkmonitor DESTINATION bin)
endif(GTK2_FOUND)
......@@ -14,7 +14,7 @@ int quickslots=0;
GtkListStore *quickstore = NULL;
GtkBuilder* builder;
struct gtkmonitor_config gtkm_conf;
char glade_path[MAX_PATH+1];
extern const char builder_interface[];
void read_ini(void)
{
......@@ -474,15 +474,8 @@ int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);
/* load the interface */
strcpy(glade_path, argv[0]);
strcpy(getfname(glade_path), "gtkmonitor.glade");
builder = gtk_builder_new ();
if (!gtk_builder_add_from_file (builder, glade_path, &error)) {
g_warning ("Couldn't load builder file: %s", error->message);
g_error_free (error);
}
builder = gtk_builder_new();
gtk_builder_add_from_string(builder, builder_interface, -1, NULL);
/* connect the signals in the interface */
gtk_builder_connect_signals (builder, NULL);
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment