Trivial fixes.
[lxde/ldm-gtk-builder-greeter.git] / src / lightdm-gtk-builder-greeter.c
index e25d8c5..afa2ac9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *      ldm-gtk-builder-greeter.c
  *
- *      Copyright 2010 - 2011 PCMan <pcman.tw@gmail.com>
+ *      Copyright 2010 - 2012 PCMan <pcman.tw@gmail.com>
  *
  *      This program is free software; you can redistribute it and/or modify
  *      it under the terms of the GNU General Public License as published by
@@ -84,7 +84,7 @@ static void select_session(const char *session);
 
 static void select_session(const char *session)
 {
-    GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(sessions_combo));
+    GtkTreeModel *model = GTK_TREE_MODEL(sessions_model);
     GtkTreeIter iter;
 
     if(!session)
@@ -156,7 +156,7 @@ static const char* get_selected_language()
 
 static void select_language(const char *lang)
 {
-    GtkTreeModel* model = gtk_combo_box_get_model(GTK_COMBO_BOX(lang_combo));
+    GtkTreeModel* model = GTK_TREE_MODEL(languages_model);
     GtkTreeIter iter;
     if(lang && gtk_tree_model_get_iter_first(model, &iter))
     {
@@ -543,11 +543,11 @@ static void load_exit_buttons(GtkBuilder* builder)
     if(suspend_btn)
         g_signal_connect(suspend_btn, "clicked", G_CALLBACK(on_suspend), NULL);
     if(hibernate_btn)
-        g_signal_connect(suspend_btn, "clicked", G_CALLBACK(on_hibernate), NULL);
+        g_signal_connect(hibernate_btn, "clicked", G_CALLBACK(on_hibernate), NULL);
     if(shutdown_btn)
-        g_signal_connect(suspend_btn, "clicked", G_CALLBACK(on_shutdown), NULL);
+        g_signal_connect(shutdown_btn, "clicked", G_CALLBACK(on_shutdown), NULL);
     if(restart_btn)
-        g_signal_connect(suspend_btn, "clicked", G_CALLBACK(on_restart), NULL);
+        g_signal_connect(restart_btn, "clicked", G_CALLBACK(on_restart), NULL);
 }
 
 static void on_login_entry_activate(GtkEntry* entry, gpointer user_data)