summaryrefslogtreecommitdiff
path: root/rcm-client-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'rcm-client-main.c')
-rw-r--r--rcm-client-main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/rcm-client-main.c b/rcm-client-main.c
index 51f296b..c12f046 100644
--- a/rcm-client-main.c
+++ b/rcm-client-main.c
@@ -113,15 +113,25 @@ manager_ready_cb(GObject *source, GAsyncResult *res, gpointer user_data)
int main (int argc, char *argv[])
{
- GtkWidget *win;
+ GdkDisplay *display;
GdkScreen *screen;
+ GtkWidget *win;
gint monitor;
GdkRectangle rect;
+ GtkCssProvider *css;
global = g_malloc(sizeof(*global));
gtk_init (&argc, &argv);
+ display = gdk_display_get_default();
+ screen = gdk_display_get_default_screen(display);
+
+ css = gtk_css_provider_new();
+ gtk_css_provider_load_from_path(css, "rcm.css", NULL);
+ gtk_style_context_add_provider_for_screen(screen, GTK_STYLE_PROVIDER(css), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref(css);
+
object_manager_client_new_for_bus(G_BUS_TYPE_SESSION,
G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
"org.gnome.RemoteControlManager",
@@ -129,10 +139,10 @@ int main (int argc, char *argv[])
NULL, manager_ready_cb, NULL);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name(win, "RemoteControlClientWindow");
global->window = GTK_WINDOW(win);
g_signal_connect(win, "destroy", G_CALLBACK (gtk_main_quit), NULL);
- screen = gtk_window_get_screen(global->window);
monitor = gdk_screen_get_monitor_at_point(screen, 0, 0);
gdk_screen_get_monitor_geometry(screen, monitor, &rect);
gtk_window_set_default_size(global->window,