]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/gossip-accounts-dialog.c
[darcs-to-svn @ Use icon-name API instead of stock icons and update tango icons]
[empathy.git] / libempathy-gtk / gossip-accounts-dialog.c
index c4aa020b2180a1084751912fb0959353a45dcb7e..449577aec7de56b9be8078e797519edd3ba12443 100644 (file)
@@ -74,7 +74,7 @@ typedef struct {
        GtkWidget        *entry_name;
        GtkWidget        *table_new_account;
        GtkWidget        *button_create;
-       GtkWidget        *button_cancel;
+       GtkWidget        *button_back;
 
        GtkWidget        *image_type;
        GtkWidget        *label_name;
@@ -136,7 +136,7 @@ static void       accounts_dialog_entry_name_changed_cb     (GtkWidget
                                                             GossipAccountsDialog            *dialog);
 static void       accounts_dialog_button_create_clicked_cb  (GtkWidget                       *button,
                                                             GossipAccountsDialog            *dialog);
-static void       accounts_dialog_button_cancel_clicked_cb  (GtkWidget                       *button,
+static void       accounts_dialog_button_back_clicked_cb    (GtkWidget                       *button,
                                                             GossipAccountsDialog            *dialog);
 static void       accounts_dialog_button_connect_clicked_cb (GtkWidget                       *button,
                                                             GossipAccountsDialog            *dialog);
@@ -305,15 +305,12 @@ accounts_dialog_update_account (GossipAccountsDialog *dialog,
 
        if (account) {
                McProfile *profile;
-               GdkPixbuf *pixbuf;
-
-               pixbuf = gossip_pixbuf_from_account (account, GTK_ICON_SIZE_DIALOG);
-               gtk_image_set_from_pixbuf (GTK_IMAGE (dialog->image_type), pixbuf);
-               if (pixbuf) {
-                       g_object_unref (pixbuf);
-               }
 
                profile = mc_account_get_profile (account);
+               gtk_image_set_from_icon_name (GTK_IMAGE (dialog->image_type),
+                                             mc_profile_get_icon_name (profile),
+                                             GTK_ICON_SIZE_DIALOG);
+               
 
                gtk_label_set_text (GTK_LABEL (dialog->label_type),
                                    mc_profile_get_display_name (profile));
@@ -412,6 +409,7 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn    *tree_column,
                                        GossipAccountsDialog *dialog)
 {
        McAccount                 *account;
+       const gchar               *icon_name;
        GdkPixbuf                 *pixbuf;
        TelepathyConnectionStatus  status;
 
@@ -420,7 +418,8 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn    *tree_column,
                            COL_ACCOUNT_POINTER, &account,
                            -1);
 
-       pixbuf = gossip_pixbuf_from_account (account, GTK_ICON_SIZE_BUTTON);
+       icon_name = gossip_icon_name_from_account (account);
+       pixbuf = gossip_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
 
        if (pixbuf) {
                if (status == TP_CONN_STATUS_DISCONNECTED ||
@@ -779,8 +778,8 @@ accounts_dialog_button_create_clicked_cb (GtkWidget             *button,
 }
 
 static void
-accounts_dialog_button_cancel_clicked_cb (GtkWidget             *button,
-                                         GossipAccountsDialog  *dialog)
+accounts_dialog_button_back_clicked_cb (GtkWidget             *button,
+                                       GossipAccountsDialog  *dialog)
 {
        McAccount *account;
 
@@ -969,7 +968,7 @@ gossip_accounts_dialog_show (void)
                                       "entry_name", &dialog->entry_name,
                                       "table_new_account", &dialog->table_new_account,
                                       "button_create", &dialog->button_create,
-                                      "button_cancel", &dialog->button_cancel,
+                                      "button_back", &dialog->button_back,
                                       "image_type", &dialog->image_type,
                                       "label_type", &dialog->label_type,
                                       "label_name", &dialog->label_name,
@@ -983,7 +982,7 @@ gossip_accounts_dialog_show (void)
                              "accounts_dialog", "destroy", accounts_dialog_destroy_cb,
                              "accounts_dialog", "response", accounts_dialog_response_cb,
                              "button_create", "clicked", accounts_dialog_button_create_clicked_cb,
-                             "button_cancel", "clicked", accounts_dialog_button_cancel_clicked_cb,
+                             "button_back", "clicked", accounts_dialog_button_back_clicked_cb,
                              "entry_name", "changed", accounts_dialog_entry_name_changed_cb,
                              "treeview", "row-activated", accounts_dialog_treeview_row_activated_cb,
                              "button_connect", "clicked", accounts_dialog_button_connect_clicked_cb,