fetchhublist(pubhubaddr, filter);
}
+void cb_main_pubhubabort_clicked(GtkWidget *widget, gpointer data)
+{
+ aborthublist();
+}
+
void cb_main_dcnctbtn_clicked(GtkWidget *widget, gpointer data)
{
GtkTreeIter iter;
static char *mybuf;
static size_t mybufsize, mybufdata;
+#include "mainwnd.gtkh"
+
void aborthublist(void)
{
if(mybuf != NULL) {
mybufsize = mybufdata = 0;
}
if(hc != NULL) {
+ gtk_widget_hide(main_pubhubbarbox);
if(itag != -1)
gdk_input_remove(itag);
if(otag != -1)
return;
}
state = 1;
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(main_pubhubbar), _("Getting list..."));
}
}
if(state == 1) {
+ if(hc->tlen > 0) {
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(main_pubhubbar), ((double)hc->rxd) / ((double)hc->tlen));
+ } else {
+ gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(main_pubhubbar), ((double)hc->databufdata) / 10000.0);
+ gtk_progress_bar_pulse(GTK_PROGRESS_BAR(main_pubhubbar));
+ }
if(hc->databufdata > 0) {
if(bzs == NULL) {
bufcat(mybuf, hc->databuf, hc->databufdata);
memmove(mybuf, mybuf + hret, mybufdata -= hret);
}
if(ret) {
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(main_pubhubbar), 1);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(main_pubhubbar), _("Finalizing list..."));
+ gdk_window_process_updates(main_pubhubbar->window, FALSE);
handler(PHO_EOF, NULL, 0);
aborthublist();
}
freeurl(u);
state = 0;
settags();
+ gtk_widget_show(main_pubhubbarbox);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(main_pubhubbar), _("Connecting..."));
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(main_pubhubbar), 0);
+ gdk_window_process_updates(main_pubhubbarbox->window, TRUE);
len = strlen(url);
p = url + len;
$tvcol title: "Description" text: 2 sortcol: 2 resizable: TRUE
end
end
+ :hbox name: pubhubbarbox var: y noshow: y
+ $pbar name: pubhubbar var: y expand: TRUE fill: TRUE
+ $sbtn stock: CANCEL name: pubhubabort sig: clicked
+ end
:table rows: 2 cols: 3 fill: TRUE
$mlbl label: "_Filter:" tx: 0 ty: 0 mwidget: pubhubfilter
$text name: pubhubfilter var: y expand: y fill: y sig: activate tx: 1 ty: 0