mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
Reformat
This commit is contained in:
parent
cf2f508491
commit
c2a57e4aa1
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- Generated with glade 3.22.1 -->
|
|
||||||
<interface>
|
|
||||||
<requires lib="gtk+" version="3.10"/>
|
|
||||||
<object class="GtkApplicationWindow" id="appwin">
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="title" translatable="yes">Wifi hotspot</property>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkListBox">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="selection_mode">multiple</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</interface>
|
|
@ -1,55 +1,47 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_hello (GtkWidget *widget,
|
print_hello(GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data) {
|
||||||
{
|
g_print("Hello World\n");
|
||||||
g_print ("Hello World\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_hello2 (GtkWidget *widget,
|
static void print_hello2(GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data) {
|
||||||
{
|
g_print("Hello World 2\n");
|
||||||
g_print ("Hello World 2\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc,char *argv[]) {
|
||||||
|
GtkBuilder *builder;
|
||||||
|
GObject *window;
|
||||||
|
GObject *button;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
gtk_init(&argc, &argv);
|
||||||
|
|
||||||
int
|
/* Construct a GtkBuilder instance and load our UI description */
|
||||||
main (int argc,
|
builder = gtk_builder_new();
|
||||||
char *argv[])
|
if (gtk_builder_add_from_file(builder, "glade/main.ui", &error) == 0) {
|
||||||
{
|
g_printerr("Error loading file: %s\n", error->message);
|
||||||
GtkBuilder *builder;
|
g_clear_error(&error);
|
||||||
GObject *window;
|
return 1;
|
||||||
GObject *button;
|
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
gtk_init (&argc, &argv);
|
|
||||||
|
|
||||||
/* Construct a GtkBuilder instance and load our UI description */
|
|
||||||
builder = gtk_builder_new ();
|
|
||||||
if (gtk_builder_add_from_file (builder, "glade/main.ui", &error) == 0)
|
|
||||||
{
|
|
||||||
g_printerr ("Error loading file: %s\n", error->message);
|
|
||||||
g_clear_error (&error);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Connect signal handlers to the constructed widgets. */
|
/* Connect signal handlers to the constructed widgets. */
|
||||||
window = gtk_builder_get_object (builder, "window");
|
window = gtk_builder_get_object(builder, "window");
|
||||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
|
g_signal_connect (window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
|
||||||
|
|
||||||
button = gtk_builder_get_object (builder, "button1");
|
button = gtk_builder_get_object(builder, "button1");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
|
g_signal_connect (button, "clicked", G_CALLBACK(print_hello), NULL);
|
||||||
|
|
||||||
button = gtk_builder_get_object (builder, "button_new");
|
button = gtk_builder_get_object(builder, "button_new");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (print_hello2), NULL);
|
g_signal_connect (button, "clicked", G_CALLBACK(print_hello2), NULL);
|
||||||
|
|
||||||
button = gtk_builder_get_object (builder, "quit");
|
button = gtk_builder_get_object(builder, "quit");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
|
g_signal_connect (button, "clicked", G_CALLBACK(gtk_main_quit), NULL);
|
||||||
|
|
||||||
gtk_main ();
|
gtk_main();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user