aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chatrooms-window.c66
-rw-r--r--src/empathy-chatrooms-window.ui24
2 files changed, 10 insertions, 80 deletions
diff --git a/src/empathy-chatrooms-window.c b/src/empathy-chatrooms-window.c
index aae8aac32..35e3e8b9d 100644
--- a/src/empathy-chatrooms-window.c
+++ b/src/empathy-chatrooms-window.c
@@ -50,7 +50,6 @@ typedef struct {
GtkWidget *account_chooser;
GtkWidget *treeview;
GtkWidget *button_remove;
- GtkWidget *button_edit;
GtkWidget *button_close;
} EmpathyChatroomsWindow;
@@ -66,16 +65,8 @@ static void chatrooms_window_model_add (Empath
static void chatrooms_window_model_cell_auto_connect_toggled (GtkCellRendererToggle *cell,
gchar *path_string,
EmpathyChatroomsWindow *window);
-static EmpathyChatroom * chatrooms_window_model_get_selected (EmpathyChatroomsWindow *window);
-static void chatrooms_window_model_action_selected (EmpathyChatroomsWindow *window);
-static void chatrooms_window_row_activated_cb (GtkTreeView *tree_view,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- EmpathyChatroomsWindow *window);
static void chatrooms_window_button_remove_clicked_cb (GtkWidget *widget,
EmpathyChatroomsWindow *window);
-static void chatrooms_window_button_edit_clicked_cb (GtkWidget *widget,
- EmpathyChatroomsWindow *window);
static void chatrooms_window_button_close_clicked_cb (GtkWidget *widget,
EmpathyChatroomsWindow *window);
static void chatrooms_window_chatroom_added_cb (EmpathyChatroomManager *manager,
@@ -120,7 +111,6 @@ empathy_chatrooms_window_show (GtkWindow *parent)
"hbox_account", &window->hbox_account,
"label_account", &window->label_account,
"treeview", &window->treeview,
- "button_edit", &window->button_edit,
"button_remove", &window->button_remove,
"button_close", &window->button_close,
NULL);
@@ -129,7 +119,6 @@ empathy_chatrooms_window_show (GtkWindow *parent)
empathy_builder_connect (gui, window,
"chatrooms_window", "destroy", chatrooms_window_destroy_cb,
"button_remove", "clicked", chatrooms_window_button_remove_clicked_cb,
- "button_edit", "clicked", chatrooms_window_button_edit_clicked_cb,
"button_close", "clicked", chatrooms_window_button_close_clicked_cb,
NULL);
@@ -206,10 +195,6 @@ chatrooms_window_model_setup (EmpathyChatroomsWindow *window)
/* View */
view = GTK_TREE_VIEW (window->treeview);
- g_signal_connect (view, "row-activated",
- G_CALLBACK (chatrooms_window_row_activated_cb),
- window);
-
/* Store */
store = gtk_list_store_new (COL_COUNT,
G_TYPE_STRING, /* Image */
@@ -400,46 +385,6 @@ chatrooms_window_model_cell_auto_connect_toggled (GtkCellRendererToggle *cell,
g_object_unref (chatroom);
}
-static EmpathyChatroom *
-chatrooms_window_model_get_selected (EmpathyChatroomsWindow *window)
-{
- GtkTreeView *view;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- EmpathyChatroom *chatroom = NULL;
-
- view = GTK_TREE_VIEW (window->treeview);
- selection = gtk_tree_view_get_selection (view);
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, COL_POINTER, &chatroom, -1);
- }
-
- return chatroom;
-}
-
-static void
-chatrooms_window_model_action_selected (EmpathyChatroomsWindow *window)
-{
- EmpathyChatroom *chatroom;
-
- /* FIXME: This is still not implemented since Gossip fork */
- chatroom = chatrooms_window_model_get_selected (window);
- g_object_unref (chatroom);
-}
-
-static void
-chatrooms_window_row_activated_cb (GtkTreeView *tree_view,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- EmpathyChatroomsWindow *window)
-{
- if (gtk_widget_is_sensitive (window->button_edit)) {
- chatrooms_window_model_action_selected (window);
- }
-}
-
static void
chatrooms_window_button_remove_clicked_cb (GtkWidget *widget,
EmpathyChatroomsWindow *window)
@@ -468,17 +413,6 @@ chatrooms_window_button_remove_clicked_cb (GtkWidget *widget,
}
static void
-chatrooms_window_button_edit_clicked_cb (GtkWidget *widget,
- EmpathyChatroomsWindow *window)
-{
- EmpathyChatroom *chatroom;
-
- /* FIXME: This is still not implemented since Gossip fork */
- chatroom = chatrooms_window_model_get_selected (window);
- g_object_unref (chatroom);
-}
-
-static void
chatrooms_window_button_close_clicked_cb (GtkWidget *widget,
EmpathyChatroomsWindow *window)
{
diff --git a/src/empathy-chatrooms-window.ui b/src/empathy-chatrooms-window.ui
index 3d18051d4..83f3fd064 100644
--- a/src/empathy-chatrooms-window.ui
+++ b/src/empathy-chatrooms-window.ui
@@ -62,39 +62,35 @@
<object class="GtkHButtonBox" id="hbuttonbox3">
<property name="visible">True</property>
<property name="spacing">6</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button_remove">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
<property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="button_edit">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
- <property name="label">gtk-edit</property>
+ <property name="receives_default">False</property>
<property name="use_stock">True</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_close">
+ <property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
- <property name="label">gtk-close</property>
+ <property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
</object>